diff --git a/Dockerfile b/Dockerfile index 1940f896..9117463e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -18,8 +18,11 @@ COPY api/ api/ COPY web/src/ web/src/ COPY web/config-overrides.js web/tsconfig.json web/ -RUN sed -i '/"homepage":/d' web/package.json +WORKDIR /app/web +RUN yarn prepare +RUN sed -i '/"homepage":/d' package.json +WORKDIR /app RUN yarn build WORKDIR /app/api diff --git a/docker-compose.example.yml b/docker-compose.example.yml new file mode 100644 index 00000000..efec5de1 --- /dev/null +++ b/docker-compose.example.yml @@ -0,0 +1,23 @@ +version: "3.8" +services: + api: + platform: linux/amd64 + image: codegouvfr/api + env_file: .env + restart: unless-stopped + + web: + platform: linux/amd64 + image: codegouvfr/web + restart: unless-stopped + + nginx: + image: nginx:alpine + ports: + - "80:80" + volumes: + - ./nginx/etc/nginx/conf.d/:/etc/nginx/conf.d/ + depends_on: + - api + - web + restart: unless-stopped diff --git a/docker-compose.yml b/docker-compose.yml index 955648c9..b9b12295 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -18,7 +18,7 @@ services: nginx: image: nginx:alpine ports: - - "4000:80" # Map port 80 on the host to port 80 in the NGINX container + - "80:80" # Map port 80 on the host to port 80 in the NGINX container volumes: - ./nginx/etc/nginx/conf.d/:/etc/nginx/conf.d/ depends_on: