From 2c61f0ee215078c9a64b7e10d8402f05404a5cbb Mon Sep 17 00:00:00 2001 From: Pablo Oliva Date: Fri, 20 Aug 2021 11:27:37 +0200 Subject: [PATCH] Prep for Caddy and new hosting. --- Dockerfile-prod => Dockerfile | 2 +- docker-compose-clnt-prod.yml | 19 ------------------- docker-compose-dev.yml | 13 +++++++++++++ docker-compose-stage.yml | 18 ++++++++++++++++++ docker-compose.yml | 19 ++++++------------- nginx/nginx-custom.conf | 4 ++-- 6 files changed, 40 insertions(+), 35 deletions(-) rename Dockerfile-prod => Dockerfile (98%) delete mode 100755 docker-compose-clnt-prod.yml create mode 100755 docker-compose-dev.yml create mode 100755 docker-compose-stage.yml diff --git a/Dockerfile-prod b/Dockerfile similarity index 98% rename from Dockerfile-prod rename to Dockerfile index 028f9381..0ad6c191 100755 --- a/Dockerfile-prod +++ b/Dockerfile @@ -17,5 +17,5 @@ COPY --from=build-stage /app/nginx/nginx-custom.conf /etc/nginx/conf.d/default.c # COPY --from=build-stage /app/nginx/ssl.conf /etc/nginx/conf.d/ssl.conf COPY --from=build-stage /app/nginx/mime.types /etc/nginx/conf.d/mime.types RUN mkdir -p /etc/nginx/logs -EXPOSE 80 +EXPOSE 8080 CMD ["nginx", "-g", "daemon off;"] diff --git a/docker-compose-clnt-prod.yml b/docker-compose-clnt-prod.yml deleted file mode 100755 index 9f8ceed5..00000000 --- a/docker-compose-clnt-prod.yml +++ /dev/null @@ -1,19 +0,0 @@ -version: '3' -services: - clnt-prod: - image: pablooliva/ch.ckl.st-client:latest - container_name: chcklst-client - restart: always - command: nginx -g 'daemon off;' - volumes: - - /home/chcklst/client/nginx-logs:/etc/nginx/logs - expose: - - 80 - environment: - VIRTUAL_HOST: ch.ckl.st - LETSENCRYPT_HOST: ch.ckl.st - LETSENCRYPT_EMAIL: pablo@qecept.com -networks: - default: - external: - name: nginx-proxy diff --git a/docker-compose-dev.yml b/docker-compose-dev.yml new file mode 100755 index 00000000..eeaacdf6 --- /dev/null +++ b/docker-compose-dev.yml @@ -0,0 +1,13 @@ +version: '3' + +services: + clnt-dev: + build: + context: . + dockerfile: Dockerfile-dev + container_name: chcklst-client-dev + command: npm start + volumes: + - '.:/app' + ports: + - '4200:4200' diff --git a/docker-compose-stage.yml b/docker-compose-stage.yml new file mode 100755 index 00000000..7b903ee5 --- /dev/null +++ b/docker-compose-stage.yml @@ -0,0 +1,18 @@ +version: '3' + +networks: + web: + external: true + +services: + clnt-stage: + build: + context: . + container_name: chcklst-client-stage + command: nginx -g 'daemon off;' + volumes: + - './nginx/nginx-custom-local.conf:/etc/nginx/conf.d/default.conf' + ports: + - '8080:8080' + networks: + - web diff --git a/docker-compose.yml b/docker-compose.yml index a4d69503..d374e6d7 100755 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -5,22 +5,15 @@ networks: external: true services: - clnt-dev: + clnt-prod: build: context: . - dockerfile: Dockerfile-dev - container_name: chcklst-client - command: npm start - volumes: - - '.:/app' - ports: - - '4200:4200' - clnt-stage: - image: 'pablooliva/ch.ckl.st-client:latest' + container_name: chcklst-client-prod + restart: always command: nginx -g 'daemon off;' - ports: - - '8080:8080' volumes: - - './nginx/nginx-custom-local.conf:/etc/nginx/conf.d/default.conf' + - /home/chcklst/client/nginx-logs:/etc/nginx/logs + expose: + - 8080 networks: - web diff --git a/nginx/nginx-custom.conf b/nginx/nginx-custom.conf index 98f1d5a5..7c65ef09 100644 --- a/nginx/nginx-custom.conf +++ b/nginx/nginx-custom.conf @@ -126,8 +126,8 @@ server { server { server_name ch.ckl.st; - listen 80 http2; - listen [::]:80 http2; + listen 8080 http2; + listen [::]:8080 http2; location ~* /\.(?!well-known\/) { deny all; }