34 lines
731 B
YAML
34 lines
731 B
YAML
x-default: &default
|
|
restart: unless-stopped
|
|
logging:
|
|
driver: json-file
|
|
options:
|
|
max-size: 100m
|
|
max-file: "3"
|
|
|
|
services:
|
|
clash:
|
|
<<: *default
|
|
image: 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: "0.5"
|
|
memory: 512M
|
|
reservations:
|
|
cpus: "0.25"
|
|
memory: 256M
|
|
healthcheck:
|
|
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:80/"]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 3
|
|
start_period: 10s
|