Files
compose-anything/src/clash/docker-compose.yaml
T
2026-02-23 17:41:05 +08:00

34 lines
838 B
YAML

x-defaults: &defaults
restart: unless-stopped
logging:
driver: json-file
options:
max-size: 100m
max-file: '3'
services:
clash:
<<: *defaults
image: ${GLOBAL_REGISTRY:-}centralx/clash:${CLASH_VERSION:-1.18.0}
ports:
- '7880:80'
- '7890:7890'
volumes:
- ./config.yaml:/home/runner/.config/clash/config.yaml
environment:
- TZ=${TZ:-UTC}
deploy:
resources:
limits:
cpus: ${CLASH_CPU_LIMIT:-0.5}
memory: ${CLASH_MEMORY_LIMIT:-512M}
reservations:
cpus: ${CLASH_CPU_RESERVATION:-0.25}
memory: ${CLASH_MEMORY_RESERVATION:-256M}
healthcheck:
test: [CMD, wget, --no-verbose, --tries=1, --spider, 'http://localhost:80/']
interval: 30s
timeout: 10s
retries: 3
start_period: 10s