7aa439d7a7
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
55 lines
1.1 KiB
YAML
55 lines
1.1 KiB
YAML
networks:
|
|
proxy_net:
|
|
driver: bridge
|
|
|
|
volumes:
|
|
caddy_data:
|
|
caddy_config:
|
|
|
|
services:
|
|
mihomo:
|
|
image: ghcr.io/metacubex/mihomo:latest
|
|
volumes:
|
|
- ./data/mihomo:/root/.config/mihomo
|
|
networks:
|
|
- proxy_net
|
|
restart: unless-stopped
|
|
healthcheck:
|
|
test: ["CMD", "wget", "-q", "-O-", "http://localhost:9090/version"]
|
|
interval: 5s
|
|
timeout: 3s
|
|
retries: 12
|
|
start_period: 5s
|
|
|
|
app:
|
|
build: ./app
|
|
env_file: .env
|
|
volumes:
|
|
- ./data/mihomo:/data/mihomo
|
|
- ./data/db:/data/db
|
|
networks:
|
|
- proxy_net
|
|
restart: unless-stopped
|
|
depends_on:
|
|
mihomo:
|
|
condition: service_healthy
|
|
|
|
caddy:
|
|
image: caddy:2-alpine
|
|
ports:
|
|
- "80:80"
|
|
- "443:443"
|
|
- "443:443/udp"
|
|
volumes:
|
|
- ./Caddyfile:/etc/caddy/Caddyfile:ro
|
|
- ./caddy/entrypoint.sh:/entrypoint.sh:ro
|
|
- caddy_data:/data
|
|
- caddy_config:/config
|
|
entrypoint: ["/bin/sh", "/entrypoint.sh"]
|
|
env_file: .env
|
|
networks:
|
|
- proxy_net
|
|
restart: unless-stopped
|
|
depends_on:
|
|
- app
|