mirror of
https://github.com/StepanovPlaton/HomeServerServices.git
synced 2026-04-03 20:30:44 +04:00
38 lines
1.2 KiB
YAML
38 lines
1.2 KiB
YAML
services:
|
|
ddns-updater:
|
|
image: alpine:latest
|
|
container_name: ddns-updater
|
|
env_file: .env
|
|
volumes:
|
|
- ./update_dns.sh:/update_dns.sh:ro
|
|
entrypoint: ["/bin/sh", "-c"]
|
|
command:
|
|
- |
|
|
apk add --no-cache curl bash
|
|
/bin/bash /update_dns.sh
|
|
restart: "no"
|
|
|
|
nginx-proxy:
|
|
image: nginx:alpine
|
|
container_name: nginx-proxy
|
|
restart: always
|
|
ports:
|
|
- 80:80
|
|
- 443:443
|
|
volumes:
|
|
- ./nginx/conf.d:/etc/nginx/conf.d:ro
|
|
# Папки для SSL сертификатов
|
|
- ./ssl/conf:/etc/letsencrypt:ro
|
|
- ./ssl/www:/var/www/certbot:ro
|
|
# Подхватываем новые ssl сертификаты
|
|
command: /bin/sh -c "while :; do sleep 24h & wait $${!}; nginx -s reload; done & nginx -g 'daemon off;'"
|
|
|
|
certbot:
|
|
image: certbot/certbot
|
|
container_name: certbot
|
|
volumes:
|
|
- ./ssl/conf:/etc/letsencrypt
|
|
- ./ssl/www:/var/www/certbot
|
|
# Проверяет сертификаты дважды в сутки. Если осталось менее 30 дней - обновляем
|
|
entrypoint: "/bin/sh -c 'trap exit TERM; while :; do certbot renew; sleep 12h & wait $${!}; done;'"
|