-
-
Save MinimaJack/e7ba597c3431a3e8074847c0df70b5ab to your computer and use it in GitHub Desktop.
docker-compose.yml
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: | |
image: nginx:latest | |
restart: always | |
ports: | |
- "80:80" | |
- "443:443" | |
- "8080:8080" | |
volumes: | |
- ./nginx/:/etc/nginx/conf.d | |
- ./certbot/conf:/etc/letsencrypt | |
- ./certbot/www:/var/www/certbot | |
command: "/bin/sh -c 'while :; do sleep 6h & wait $${!}; nginx -s reload; done & nginx -g \"daemon off;\"'" | |
certbot: | |
restart: always | |
image: certbot/certbot | |
volumes: | |
- ./certbot/conf:/etc/letsencrypt | |
- ./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