diff --git a/apps/api-gateway/Dockerfile b/apps/api-gateway/Dockerfile index db5e9c44..7f2c2d66 100644 --- a/apps/api-gateway/Dockerfile +++ b/apps/api-gateway/Dockerfile @@ -8,7 +8,7 @@ WORKDIR /app/builder RUN npx nx run api-gateway:build-with-engine || echo "nx run api-gateway:build failed" RUN pnpm prune --prod -FROM node:lts-alpine AS runner +FROM node:lts-alpine WORKDIR /app # optymalize adding node modules, check if it possible to bundle dependencies to output by webpack diff --git a/apps/api-gateway/docker-compose.prod.yml b/apps/api-gateway/docker-compose.prod.yml index cd97f1ef..8d12a12a 100644 --- a/apps/api-gateway/docker-compose.prod.yml +++ b/apps/api-gateway/docker-compose.prod.yml @@ -1,5 +1,3 @@ -version: '3.8' - services: api-gateway: image: registry.digitalocean.com/linkerry/api-gateway:latest @@ -18,10 +16,11 @@ services: container_name: redis env_file: - .env - command: redis-server --appendonly yes --replica-read-only no --requirepass "$${REDIS_PASSWORD:?REDIS_PASSWORD variable is not set}" + command: redis-server --appendonly yes --replica-read-only no --bind redis --port 6379 --requirepass ${REDIS_PASSWORD} restart: always ports: - - 4004:6379 + # for no reason this don't work if i change port + - 6379:6379 volumes: - redis:/data @@ -29,7 +28,7 @@ volumes: redis: driver: local -# networks: -# default: -# external: -# name: ${NETWORK:-proxy} +networks: + default: + external: + name: ${NETWORK:-proxy} diff --git a/docs/devops/nginx-proxy.md b/docs/devops/nginx-proxy.md index ac35ff5c..da752c77 100644 --- a/docs/devops/nginx-proxy.md +++ b/docs/devops/nginx-proxy.md @@ -6,8 +6,14 @@ Setup proxy test `./test.sh api.linkerry.com` +Not it will display default proxy page 'It works' + + ## For website add two DNS ![DNS records for linkerry](./dns_records.png) ## If you use Cloudflare, change SSL settings ![Cloudflare SSL settings](./ssl_cloudflare.png) + +## For subdomains add this page rules +![Cloudflare SSL settings](./ssl_cloudflare.png)