feat: add Docker infrastructure scaffold
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,54 @@
|
||||
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
|
||||
Reference in New Issue
Block a user