From 27e5d41aa4162a276e51ae06486a9bf2e4474b15 Mon Sep 17 00:00:00 2001 From: Ari Timonen Date: Sun, 8 Nov 2020 17:19:17 +0100 Subject: [PATCH] Note nginx in compose file --- docker-compose.yml | 63 +++++++++++++++++++++++----------------------- 1 file changed, 32 insertions(+), 31 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 9692d56..2198d4d 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -149,37 +149,38 @@ services: - POSTFIX_myhostname=$MAIL_DOMAIN - OPENDKIM_DOMAINS=$MAIL_DOMAIN - nginx: - image: nginx:latest - container_name: ensl_nginx - tty: true - stdin_open: 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;'" - # TODO: use env vars here - volumes: - - ./ext/ssl:/etc/ssl - - ./public/:/var/www - - ./ext/nginx.conf.d:/etc/nginx/conf.d/ensl_production - - ./ext/nginx.conf.d:/etc/nginx/conf.d/ensl_staging - - ../ensl.org.staging/app/public:/var/staging/public - # TODO: use env vars here - ports: - - 80:80 - - 443:443 - - 5000:5000 - environment: - - PRODUCTION_PUMA_PORT=$PRODUCTION_PUMA_PORT - - PRODUCTION_ROOT_DOMAIN=$PRODUCTION_ROOT_DOMAIN - - PRODUCTION_DOMAIN=$PRODUCTION_DOMAIN - - PRODUCTION_PORT=$PRODUCTION_PORT - - PRODUCTION_PORT_SSL=$PRODUCTION_PORT_SSL - - PRODUCTION_NGINX_PUBLIC=/srv/production - - STAGING_PUMA_PORT=$STAGING_PUMA_PORT - - STAGING_ROOT_DOMAIN=$STAGING_ROOT_DOMAIN - - STAGING_DOMAIN=$STAGING_DOMAIN - - STAGING_PORT=$STAGING_PORT - - STAGING_PORT_SSL=$STAGING_PORT_SSL - - STAGING_NGINX_PUBLIC=$STAGING_APP_PATH_PUBLIC + # This needs to be updated. + # nginx: + # image: nginx:latest + # container_name: ensl_nginx + # tty: true + # stdin_open: 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;'" + # # TODO: use env vars here + # volumes: + # - ./ext/ssl:/etc/ssl + # - ./public/:/var/www + # - ./ext/nginx.conf.d:/etc/nginx/conf.d/ensl_production + # - ./ext/nginx.conf.d:/etc/nginx/conf.d/ensl_staging + # - ../ensl.org.staging/app/public:/var/staging/public + # # TODO: use env vars here + # ports: + # - 80:80 + # - 443:443 + # - 5000:5000 + # environment: + # - PRODUCTION_PUMA_PORT=$PRODUCTION_PUMA_PORT + # - PRODUCTION_ROOT_DOMAIN=$PRODUCTION_ROOT_DOMAIN + # - PRODUCTION_DOMAIN=$PRODUCTION_DOMAIN + # - PRODUCTION_PORT=$PRODUCTION_PORT + # - PRODUCTION_PORT_SSL=$PRODUCTION_PORT_SSL + # - PRODUCTION_NGINX_PUBLIC=/srv/production + # - STAGING_PUMA_PORT=$STAGING_PUMA_PORT + # - STAGING_ROOT_DOMAIN=$STAGING_ROOT_DOMAIN + # - STAGING_DOMAIN=$STAGING_DOMAIN + # - STAGING_PORT=$STAGING_PORT + # - STAGING_PORT_SSL=$STAGING_PORT_SSL + # - STAGING_NGINX_PUBLIC=$STAGING_APP_PATH_PUBLIC # spring: # build: