baseline: OpenMU upstream b5a0961 (fresh source)
This commit is contained in:
46
deploy/all-in-one/docker-compose.prod.yml
Normal file
46
deploy/all-in-one/docker-compose.prod.yml
Normal file
@@ -0,0 +1,46 @@
|
||||
services:
|
||||
openmu-startup:
|
||||
restart: "unless-stopped"
|
||||
environment:
|
||||
ASPNETCORE_ENVIRONMENT: Production
|
||||
|
||||
database:
|
||||
restart: "unless-stopped"
|
||||
|
||||
nginx-80:
|
||||
restart: "unless-stopped"
|
||||
environment:
|
||||
DOMAIN_NAME: ${DOMAIN_NAME}
|
||||
volumes:
|
||||
- ./nginx/nginx.prod80.conf:/etc/nginx/nginx.conf:ro
|
||||
- ./.htpasswd:/etc/nginx/.htpasswd
|
||||
- ./certbot/www:/var/www/certbot/:ro
|
||||
- ./nginx/templates/nginx.server_name.conf.template:/etc/nginx/templates/nginx.server_name.conf.template:ro
|
||||
|
||||
# We add another nginx here, just for HTTPs.
|
||||
# The reason is, that it's not starting when we combine port 80 and 443 until
|
||||
# the certificates are created.
|
||||
# So, when running the certbot the first time, we need to be able to access
|
||||
# the port 80 - and we solve this by separating the server configs.
|
||||
nginx-443:
|
||||
image: nginx:alpine
|
||||
container_name: nginx-443
|
||||
restart: "unless-stopped"
|
||||
environment:
|
||||
DOMAIN_NAME: ${DOMAIN_NAME}
|
||||
ports:
|
||||
- "443:443"
|
||||
volumes:
|
||||
- ./nginx/nginx.prod443.conf:/etc/nginx/nginx.conf:ro
|
||||
- ./.htpasswd:/etc/nginx/.htpasswd
|
||||
- ./certbot/conf/:/etc/nginx/ssl/:ro
|
||||
- ./nginx/templates/nginx.server_name.conf.template:/etc/nginx/templates/nginx.server_name.conf.template:ro
|
||||
- ./nginx/templates/nginx.prod.certificates.conf.template:/etc/nginx/templates/nginx.prod.certificates.conf.template:ro
|
||||
depends_on:
|
||||
- openmu-startup
|
||||
|
||||
certbot:
|
||||
image: certbot/certbot:latest
|
||||
volumes:
|
||||
- ./certbot/www/:/var/www/certbot/:rw
|
||||
- ./certbot/conf/:/etc/letsencrypt/:rw
|
||||
Reference in New Issue
Block a user