Refactoring

This commit is contained in:
2026-01-15 00:14:56 +04:00
parent 9eeb0fb1f2
commit 09bd0766b0
27 changed files with 370 additions and 47 deletions

View File

@@ -1,8 +1,6 @@
docker compose -f init-compose.yml up -d
docker compose run --rm --entrypoint "certbot" certbot certonly --webroot \
--webroot-path=/var/www/certbot \
--email your-email@gmail.com \
--agree-tos \
--no-eff-email \
-d domain.com
-d domain.com -d domain2.com

View File

@@ -1,10 +1,7 @@
domain.com
domain.ru
@
www
subdomain1
subdomain2
domain2.com
@
www
subdomain1
git
disk
matrix
chat

View File

@@ -13,6 +13,13 @@ services:
- ./ssl/www:/var/www/certbot:ro
# Подхватываем новые ssl сертификаты
command: /bin/sh -c "while :; do sleep 24h & wait $${!}; nginx -s reload; done & nginx -g 'daemon off;'"
deploy:
resources:
limits:
cpus: '0.25'
memory: 128M
reservations:
memory: 64M
networks:
- proxy_network
- gitea_network
@@ -27,6 +34,13 @@ services:
- ./ssl/www:/var/www/certbot
# Проверяет сертификаты дважды в сутки. Если осталось менее 30 дней - обновляем
entrypoint: "/bin/sh -c 'trap exit TERM; while :; sleep 30s & wait $${!}; do certbot renew; sleep 12h & wait $${!}; done;'"
deploy:
resources:
limits:
cpus: '0.25'
memory: 128M
reservations:
memory: 64M
networks:
- proxy_network
@@ -39,18 +53,26 @@ services:
- ./ddns/domains.txt:/app/domains.txt
environment:
- TZ=Europe/Samara
deploy:
resources:
limits:
cpus: '0.25'
memory: 128M
reservations:
memory: 64M
networks:
- proxy_network
networks:
proxy_network:
name: proxy_network
driver: bridge
gitea_network:
external: true
name: gitea_gitea_network
name: gitea_network
cloud_network:
external: true
name: cloud_cloud_network
name: cloud_network
matrix_network:
external: true
name: matrix_matrix_network
name: matrix_network

View File

@@ -8,6 +8,13 @@ services:
- ./ddns/domains.txt:/app/domains.txt
environment:
- TZ=Europe/Samara
deploy:
resources:
limits:
cpus: '0.25'
memory: 128M
reservations:
memory: 64M
nginx-proxy:
image: nginx:alpine
@@ -20,3 +27,10 @@ services:
# Папки для SSL сертификатов
- ./ssl/conf:/etc/letsencrypt:ro
- ./ssl/www:/var/www/certbot:ro
deploy:
resources:
limits:
cpus: '0.25'
memory: 128M
reservations:
memory: 64M