Files
rustyip/docker-compose.yml
T
NetworkCats ccfa7decda feat: schedule DB updates at fixed daily UTC time instead of interval
Replace DB_UPDATE_INTERVAL_HOURS with DB_UPDATE_TIME_UTC (HH:MM format,
default 01:20) so the database update runs at a predictable time each day.
This ensures the update happens 20 minutes after the upstream Merged IP
Data release at 01:00 UTC.
2026-03-22 16:43:02 +08:00

45 lines
1.2 KiB
YAML

services:
haproxy:
image: haproxy:3.3.4-alpine3.23
ports:
- "443:443"
volumes:
- ./haproxy/haproxy.cfg:/usr/local/etc/haproxy/haproxy.cfg:ro
- ./haproxy/ipv4_domain.lst:/usr/local/etc/haproxy/ipv4_domain.lst:ro
- ${CERT_PATH:-./haproxy/certs}:/etc/haproxy/certs:ro
- ${IPV4_CERT_PATH:-./haproxy/certs-ipv4}:/etc/haproxy/certs-ipv4:ro
depends_on:
app:
condition: service_healthy
restart: unless-stopped
networks:
- internal
app:
build: .
environment:
- LISTEN_ADDR=0.0.0.0:3000
- DB_PATH=/data/Merged-IP.mmdb
- DB_UPDATE_URL=${DB_UPDATE_URL:-https://github.com/NetworkCats/Merged-IP-Data/releases/latest/download/Merged-IP.mmdb}
- DB_UPDATE_TIME_UTC=${DB_UPDATE_TIME_UTC:-01:20}
- SITE_DOMAIN=${SITE_DOMAIN:-localhost}
- IPV4_DOMAIN=${IPV4_DOMAIN:-}
volumes:
- db_data:/data
healthcheck:
test: ["CMD-SHELL", "wget -qO- http://127.0.0.1:3000/health || exit 1"]
interval: 10s
timeout: 5s
retries: 3
start_period: 30s
restart: unless-stopped
networks:
- internal
volumes:
db_data:
networks:
internal:
driver: bridge