Skip to content

Instantly share code, notes, and snippets.

@ravikyada
Created October 24, 2023 08:08
Show Gist options
  • Save ravikyada/43a694a1897e79c61562358ab0936910 to your computer and use it in GitHub Desktop.
Save ravikyada/43a694a1897e79c61562358ab0936910 to your computer and use it in GitHub Desktop.
version: '3'
services:
nginx:
image: nginx:1.15-alpine
ports:
- "80:80"
- "443:443"
volumes:
- ./data/nginx:/etc/nginx/conf.d
- ./data/certbot/conf:/etc/letsencrypt
- ./data/certbot/www:/var/www/certbot
depends_on:
- certbot
certbot:
image: certbot/certbot
volumes:
- ./data/certbot/conf:/etc/letsencrypt
- ./data/certbot/www:/var/www/certbot
command: certonly --webroot --webroot-path=/var/www/certbot --email test.demo@gmail.com --agree-tos -d test.demo.in -d www.test.demo.in
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