mirror of
https://github.com/ENSL/ensl.org.git
synced 2025-01-12 21:00:58 +00:00
Note nginx in compose file
This commit is contained in:
parent
4ff9a1fc20
commit
27e5d41aa4
1 changed files with 32 additions and 31 deletions
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue