From 9173ebe76e2aea1e8497f8ac96ff4fc26ae71c70 Mon Sep 17 00:00:00 2001 From: Mikel Elizondo Date: Tue, 12 Mar 2024 17:07:01 +0100 Subject: [PATCH] Add first version of the dockerization --- .Dockerignore | 3 +++ Dockerfile | 11 +++++++++++ docker-compose.yml | 12 ++++++++++++ package.json | 2 +- 4 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 .Dockerignore create mode 100644 Dockerfile create mode 100644 docker-compose.yml diff --git a/.Dockerignore b/.Dockerignore new file mode 100644 index 0000000..c0a0307 --- /dev/null +++ b/.Dockerignore @@ -0,0 +1,3 @@ +*compose* +*Dockerfile* +node_modules \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..e632082 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,11 @@ +FROM node:20 + +WORKDIR /app + +COPY package*.json ./ + +RUN npm install + +COPY . . + +CMD ["npm", "start"] diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..d5e1a7e --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,12 @@ +services: + docusaurus: + build: + context: . + ports: + - '3000:3000/tcp' + volumes: + - './docs:/app/docs' + - './src:/app/src' + - './static:/app/static' + - './docusaurus.config.js:/app/docusaurus.config.js' + - './sidebars.js:/app/sidebars.js' \ No newline at end of file diff --git a/package.json b/package.json index ca4d40b..685adaf 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "private": true, "scripts": { "docusaurus": "docusaurus", - "start": "docusaurus start", + "start": "docusaurus start --host 0.0.0.0", "build": "docusaurus build", "swizzle": "docusaurus swizzle", "deploy": "docusaurus deploy",