-
-
Save echicken/5e7484c7220da6889ed2287c94dceb5c to your computer and use it in GitHub Desktop.
ecbbs reverse proxy docker
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
services: | |
proxy: | |
image: nginx:latest | |
ports: | |
- 80:80 | |
- 443:443 | |
restart: always | |
volumes: | |
- ./nginx/conf.d/:/etc/nginx/conf.d/:ro | |
- ./certbot/www/:/var/www/certbot/:ro | |
- ./certbot/conf/:/etc/letsencrypt/:ro | |
certbot: | |
image: certbot/certbot:latest | |
volumes: | |
- ./certbot/www/:/var/www/certbot/:rw | |
- ./certbot/conf/:/etc/letsencrypt/:rw |
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
To make certbot grab a cert, replace [domain-name] with the domain in question: | |
docker-compose run --rm certbot certonly --webroot --webroot-path /var/www/certbot/ --dry-run -d [domain-name] | |
If that looks good, then do it again without the --dry-run option. | |
And to renew certificates, add a cron job on the host like so: | |
59 11 * * * /sbbs/reverse-proxy/renew.sh |
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
#!/bin/sh | |
cd /sbbs/reverse-proxy | |
docker-compose run --rm certbot renew >> /sbbs/reverse-proxy/certbot.log |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment