修复错误

This commit is contained in:
yml2213
2026-07-22 13:06:06 +08:00
parent 37635e0d64
commit 56e9f0cdb4
5 changed files with 77 additions and 41 deletions
+10 -11
View File
@@ -1,10 +1,3 @@
# Docker Compose for affiliate_dash (skin.khhao.com)
# In China, Docker Hub pull often hits rate limits on mirrors (e.g. docker.xuanyuan.me).
# Fix: Run "docker pull caddy:2" first, or use a mirror like registry.cn-hangzhou.aliyuncs.com/caddy/caddy:2
# Recommended: manually pull first, then docker compose up -d (no --build for caddy)
version: '3.8'
services:
backend:
build:
@@ -26,23 +19,29 @@ services:
- backend-data:/data
restart: unless-stopped
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8080/health"]
test: ["CMD", "curl", "-fsS", "http://localhost:8080/health"]
interval: 30s
timeout: 10s
retries: 3
caddy:
image: caddy:2
image: ${CADDY_RUNTIME_IMAGE:-affiliate-caddy:2}
pull_policy: never
ports:
- "80:80"
- "443:443"
volumes:
- ./Caddyfile:/etc/caddy/Caddyfile
- ./frontend/dist:/usr/share/caddy
- caddy-data:/data
- caddy-config:/config
command: caddy run --config /etc/caddy/Caddyfile --adapter caddyfile
depends_on:
- backend
backend:
condition: service_healthy
restart: unless-stopped
volumes:
backend-data:
backend-data:
caddy-data:
caddy-config: