mirror of
https://github.com/StepanovPlaton/HomeServerServices.git
synced 2026-04-03 20:30:44 +04:00
Add basic proxy
This commit is contained in:
37
proxy/docker-compose.yml
Normal file
37
proxy/docker-compose.yml
Normal file
@@ -0,0 +1,37 @@
|
||||
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;'"
|
||||
Reference in New Issue
Block a user