Note nginx in compose file

This commit is contained in:
Ari Timonen 2020-11-08 17:19:17 +01:00
parent 4ff9a1fc20
commit 27e5d41aa4

View file

@ -149,37 +149,38 @@ services:
- POSTFIX_myhostname=$MAIL_DOMAIN - POSTFIX_myhostname=$MAIL_DOMAIN
- OPENDKIM_DOMAINS=$MAIL_DOMAIN - OPENDKIM_DOMAINS=$MAIL_DOMAIN
nginx: # This needs to be updated.
image: nginx:latest # nginx:
container_name: ensl_nginx # image: nginx:latest
tty: true # container_name: ensl_nginx
stdin_open: true # tty: true
command: /bin/bash -c "cat /etc/nginx/conf.d/ensl_production/prod*.conf.template|envsubst '$$PRODUCTION_PUMA_PORT $$PRODUCTION_ROOT_DOMAIN $$PRODUCTION_DOMAIN $$PRODUCTION_PORT $$PRODUCTION_PORT_SSL $$PRODUCTION_NGINX_PUBLIC $$PUMA_PORT $$APP_PATH $$APP_PATH_PUBLIC $$STAGING_ROOT_DOMAIN $$STAGING_DOMAIN $$STAGING_PORT $$STAGING_PORT_SSL' > /etc/nginx/conf.d/default.conf && cat /etc/nginx/conf.d/*.conf && nginx -g 'daemon off;'" # stdin_open: true
# TODO: use env vars here # command: /bin/bash -c "cat /etc/nginx/conf.d/ensl_production/prod*.conf.template|envsubst '$$PRODUCTION_PUMA_PORT $$PRODUCTION_ROOT_DOMAIN $$PRODUCTION_DOMAIN $$PRODUCTION_PORT $$PRODUCTION_PORT_SSL $$PRODUCTION_NGINX_PUBLIC $$PUMA_PORT $$APP_PATH $$APP_PATH_PUBLIC $$STAGING_ROOT_DOMAIN $$STAGING_DOMAIN $$STAGING_PORT $$STAGING_PORT_SSL' > /etc/nginx/conf.d/default.conf && cat /etc/nginx/conf.d/*.conf && nginx -g 'daemon off;'"
volumes: # # TODO: use env vars here
- ./ext/ssl:/etc/ssl # volumes:
- ./public/:/var/www # - ./ext/ssl:/etc/ssl
- ./ext/nginx.conf.d:/etc/nginx/conf.d/ensl_production # - ./public/:/var/www
- ./ext/nginx.conf.d:/etc/nginx/conf.d/ensl_staging # - ./ext/nginx.conf.d:/etc/nginx/conf.d/ensl_production
- ../ensl.org.staging/app/public:/var/staging/public # - ./ext/nginx.conf.d:/etc/nginx/conf.d/ensl_staging
# TODO: use env vars here # - ../ensl.org.staging/app/public:/var/staging/public
ports: # # TODO: use env vars here
- 80:80 # ports:
- 443:443 # - 80:80
- 5000:5000 # - 443:443
environment: # - 5000:5000
- PRODUCTION_PUMA_PORT=$PRODUCTION_PUMA_PORT # environment:
- PRODUCTION_ROOT_DOMAIN=$PRODUCTION_ROOT_DOMAIN # - PRODUCTION_PUMA_PORT=$PRODUCTION_PUMA_PORT
- PRODUCTION_DOMAIN=$PRODUCTION_DOMAIN # - PRODUCTION_ROOT_DOMAIN=$PRODUCTION_ROOT_DOMAIN
- PRODUCTION_PORT=$PRODUCTION_PORT # - PRODUCTION_DOMAIN=$PRODUCTION_DOMAIN
- PRODUCTION_PORT_SSL=$PRODUCTION_PORT_SSL # - PRODUCTION_PORT=$PRODUCTION_PORT
- PRODUCTION_NGINX_PUBLIC=/srv/production # - PRODUCTION_PORT_SSL=$PRODUCTION_PORT_SSL
- STAGING_PUMA_PORT=$STAGING_PUMA_PORT # - PRODUCTION_NGINX_PUBLIC=/srv/production
- STAGING_ROOT_DOMAIN=$STAGING_ROOT_DOMAIN # - STAGING_PUMA_PORT=$STAGING_PUMA_PORT
- STAGING_DOMAIN=$STAGING_DOMAIN # - STAGING_ROOT_DOMAIN=$STAGING_ROOT_DOMAIN
- STAGING_PORT=$STAGING_PORT # - STAGING_DOMAIN=$STAGING_DOMAIN
- STAGING_PORT_SSL=$STAGING_PORT_SSL # - STAGING_PORT=$STAGING_PORT
- STAGING_NGINX_PUBLIC=$STAGING_APP_PATH_PUBLIC # - STAGING_PORT_SSL=$STAGING_PORT_SSL
# - STAGING_NGINX_PUBLIC=$STAGING_APP_PATH_PUBLIC
# spring: # spring:
# build: # build: