Created
November 27, 2020 18:09
-
-
Save cluelessperson/781bb4d4a9e0284a593516dd17f89e9c 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: "3.7" | |
services: | |
nginx: | |
image: nginx | |
volumes: | |
- nginx-etc:/etc/nginx:ro | |
- nginx-www:/var/www:ro | |
- certbot-etc:/etc/letsencrypt:ro | |
networks: | |
public: | |
ipv4_address: redacted | |
ipv6_address: redacted::2 | |
ports: | |
- 80 | |
- 443 | |
- 22 | |
command: "/bin/sh -c 'while :; do sleep 6h & wait $${!}; nginx -s reload; done & nginx -g \"daemon off;\"'" | |
restart: always | |
certbot: | |
image: certbot/certbot | |
volumes: | |
- certbot-etc:/etc/letsencrypt | |
- certbot-var:/var/ | |
- nginx-www:/var/www | |
# entrypoint: "sleep 6h" | |
entrypoint: "/bin/sh -c 'trap exit TERM; while :; do certbot renew --no-random-sleep-on-renew; sleep 12h & wait $${!}; done;'" | |
networks: | |
- public | |
restart: always |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment