45 lines
900 B
YAML
45 lines
900 B
YAML
version: '3'
|
|
services:
|
|
|
|
certbot:
|
|
image: certbot/dns-cloudflare
|
|
volumes:
|
|
- certbot_etc:/etc/letsencrypt
|
|
- ./cloudflare.ini:/root/cloudflare.ini
|
|
command: >-
|
|
certonly --dns-cloudflare
|
|
--dns-cloudflare-credentials /root/cloudflare.ini
|
|
--dns-cloudflare-propagation-seconds 15
|
|
--email admin@example.com
|
|
--agree-tos --no-eff-email
|
|
--keep-until-expiring
|
|
-d *.example.coms
|
|
# --force-renewal
|
|
|
|
nginx:
|
|
image: nginx
|
|
ports:
|
|
- "80:80"
|
|
- "443:443"
|
|
restart: "always"
|
|
logging:
|
|
driver: "json-file"
|
|
options:
|
|
max-size: "1m"
|
|
max-file: "10"
|
|
volumes:
|
|
- ./conf:/etc/nginx/conf.d
|
|
- ./nginx.conf:/etc/nginx/nginx.conf
|
|
- certbot_etc:/etc/letsencrypt
|
|
networks:
|
|
- nginx
|
|
stdin_open: true
|
|
tty: true
|
|
|
|
volumes:
|
|
certbot_etc:
|
|
|
|
networks:
|
|
nginx:
|
|
name: nginx
|