nginx-reverse-proxy/docker-compose.yml
2024-08-24 22:23:19 +00:00

26 lines
786 B
YAML

version: '3'
services:
nginx:
image: nginx:latest
container_name: nginx-reverse-proxy
ports:
- "80:80"
- "443:443"
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf
- ./certs:/etc/letsencrypt
- ./html:/var/www/html
restart: always
certbot:
image: certbot/certbot
container_name: certbot
volumes:
- ./certs:/etc/letsencrypt
- ./html:/var/www/html
# command: certonly --webroot --webroot-path=/var/www/html --email prbigoon@gmail.com --agree-tos --no-eff-email -d git.evil-bird.ru
command: renew --webroot --webroot-path=/var/www/html
entrypoint: /bin/sh -c "trap exit TERM; while :; do certbot renew --webroot --webroot-path=/var/www/html; sleep 12h & wait $${!}; done;"
depends_on:
- nginx