Refactor Caddy setup: update docker-compose, remove Dockerfile, and adjust environment variables for improved configuration management
Deploy mini-pc / deploy (push) Failing after 11s

This commit is contained in:
Dmitry
2026-05-27 19:27:41 +03:00
parent 4eb8313209
commit 234cfe7758
5 changed files with 36 additions and 25 deletions
+1
View File
@@ -91,6 +91,7 @@
- /opt/data/zerotier - /opt/data/zerotier
- /opt/configs/adguard - /opt/configs/adguard
- /opt/configs/caddy - /opt/configs/caddy
- /opt/configs/caddy/lego
- /opt/configs/npm/letsencrypt - /opt/configs/npm/letsencrypt
- name: Directory structure — ru-vps - name: Directory structure — ru-vps
+2 -2
View File
@@ -1,2 +1,2 @@
TIMEWEB_API_URL=https://api.timeweb.cloud/api/v1 LEGO_EMAIL=you@example.com
TIMEWEB_API_TOKEN=changeme TIMEWEBCLOUD_AUTH_TOKEN=changeme
+2 -9
View File
@@ -1,16 +1,9 @@
{
debug
acme_dns timeweb {
ApiURL {env.TIMEWEB_API_URL}
ApiToken {env.TIMEWEB_API_TOKEN}
}
}
git.ada-dev.ru { git.ada-dev.ru {
tls /config/lego/certificates/_.ada-dev.ru.crt /config/lego/certificates/_.ada-dev.ru.key
reverse_proxy 192.168.1.5:3002 reverse_proxy 192.168.1.5:3002
} }
cloud.ada-dev.ru { cloud.ada-dev.ru {
tls /config/lego/certificates/_.ada-dev.ru.crt /config/lego/certificates/_.ada-dev.ru.key
reverse_proxy 192.168.1.5:8081 reverse_proxy 192.168.1.5:8081
} }
-8
View File
@@ -1,8 +0,0 @@
FROM caddy:2.8.4-builder-alpine AS builder
RUN xcaddy build v2.8.4 \
--with github.com/dmtr636/caddy-dns-timeweb@v1.0.3
FROM caddy:2.8.4-alpine
COPY --from=builder /usr/bin/caddy /usr/bin/caddy
+31 -6
View File
@@ -1,12 +1,7 @@
services: services:
caddy: caddy:
image: git.ada-dev.ru/ada/caddy-timeweb:latest image: caddy:2-alpine
container_name: caddy container_name: caddy
env_file:
- .env
dns:
- 1.1.1.1
- 8.8.8.8
restart: unless-stopped restart: unless-stopped
ports: ports:
- "80:80" - "80:80"
@@ -16,4 +11,34 @@ services:
- ./Caddyfile:/etc/caddy/Caddyfile:ro - ./Caddyfile:/etc/caddy/Caddyfile:ro
- /opt/data/caddy:/data - /opt/data/caddy:/data
- /opt/configs/caddy:/config - /opt/configs/caddy:/config
lego:
image: goacme/lego:latest
container_name: caddy-lego
env_file:
- .env
restart: unless-stopped
volumes:
- /opt/configs/caddy/lego:/lego
entrypoint: /bin/sh
command:
- -c
- |
while true; do
lego \
--email "$$LEGO_EMAIL" \
--dns timewebcloud \
--domains ada-dev.ru \
--domains '*.ada-dev.ru' \
--path /lego \
renew --days 30 || \
lego \
--email "$$LEGO_EMAIL" \
--dns timewebcloud \
--domains ada-dev.ru \
--domains '*.ada-dev.ru' \
--path /lego \
run
sleep 24h
done
networks: {} networks: {}