Created
September 29, 2022 02:52
-
-
Save GlenMerlin/6a0e3fde632a1a4441bdeda1d9d8162f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '2' | |
services: | |
nginx-terminate: | |
tty: true | |
build: ./nginx-terminate/ | |
restart: unless-stopped | |
volumes: | |
- ./data/nginx-terminate:/etc/nginx/conf.d | |
- ./data/certbot/conf:/etc/letsencrypt | |
- ./data/certbot/www:/var/www/certbot | |
ports: | |
- "443:443" | |
- "80:80" | |
command: "/bin/sh -c 'while :; do sleep 6h & wait $${!}; /opt/nginx/sbin/nginx -s reload; done & /opt/nginx/sbin/nginx -c /etc/nginx/conf.d/nginx.conf -g \"daemon off;\"'" | |
nginx-relay: | |
build: ./nginx-relay/ | |
restart: unless-stopped | |
volumes: | |
- ./data/nginx-relay:/etc/nginx/conf.d | |
command: "/bin/sh -c 'while :; do sleep 6h & wait $${!}; /opt/nginx/sbin/nginx -s reload; done & /opt/nginx/sbin/nginx -c /etc/nginx/conf.d/nginx.conf -g \"daemon off;\"'" | |
certbot: | |
image: certbot/certbot | |
restart: unless-stopped | |
volumes: | |
- ./data/certbot/conf:/etc/letsencrypt | |
- ./data/certbot/www:/var/www/certbot | |
entrypoint: "/bin/sh -c 'trap exit TERM; while :; do certbot renew; sleep 12h & wait $${!}; done;'" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment