Refactor Caddy setup: update docker-compose, remove Dockerfile, and adjust environment variables for improved configuration management
Deploy mini-pc / deploy (push) Failing after 11s
Deploy mini-pc / deploy (push) Failing after 11s
This commit is contained in:
@@ -91,6 +91,7 @@
|
||||
- /opt/data/zerotier
|
||||
- /opt/configs/adguard
|
||||
- /opt/configs/caddy
|
||||
- /opt/configs/caddy/lego
|
||||
- /opt/configs/npm/letsencrypt
|
||||
|
||||
- name: Directory structure — ru-vps
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
TIMEWEB_API_URL=https://api.timeweb.cloud/api/v1
|
||||
TIMEWEB_API_TOKEN=changeme
|
||||
LEGO_EMAIL=you@example.com
|
||||
TIMEWEBCLOUD_AUTH_TOKEN=changeme
|
||||
|
||||
@@ -1,16 +1,9 @@
|
||||
{
|
||||
debug
|
||||
|
||||
acme_dns timeweb {
|
||||
ApiURL {env.TIMEWEB_API_URL}
|
||||
ApiToken {env.TIMEWEB_API_TOKEN}
|
||||
}
|
||||
}
|
||||
|
||||
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
|
||||
}
|
||||
|
||||
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
|
||||
}
|
||||
|
||||
@@ -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
|
||||
@@ -1,12 +1,7 @@
|
||||
services:
|
||||
caddy:
|
||||
image: git.ada-dev.ru/ada/caddy-timeweb:latest
|
||||
image: caddy:2-alpine
|
||||
container_name: caddy
|
||||
env_file:
|
||||
- .env
|
||||
dns:
|
||||
- 1.1.1.1
|
||||
- 8.8.8.8
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "80:80"
|
||||
@@ -16,4 +11,34 @@ services:
|
||||
- ./Caddyfile:/etc/caddy/Caddyfile:ro
|
||||
- /opt/data/caddy:/data
|
||||
- /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: {}
|
||||
|
||||
Reference in New Issue
Block a user