mirror of
https://github.com/NetworkCats/rustyip.git
synced 2026-11-13 16:17:46 +00:00
The daily scheduled update at 01:20 UTC was systematically lagging the upstream mergedipdb release by 24h. The upstream cron nominally fires at 01:00 UTC but GitHub Actions schedule latency shifts the actual publish time anywhere from ~01:05 to ~06:00+ UTC, so any fixed single-daily time misses the current release on delayed days. Introduce DB_UPDATE_INTERVAL_HOURS (default 6, must divide 24 evenly), shift the anchor DB_UPDATE_TIME_UTC default to 00:20, and replace secs_until_next with secs_until_next_tick that schedules at anchor + N*interval. Also set RUST_LOG=rustyip=info,warn in the Ansible env template so the scheduler and "database updated successfully (N bytes)" info logs are actually visible in docker logs. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
46 lines
1.2 KiB
YAML
46 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:-00:20}
|
|
- DB_UPDATE_INTERVAL_HOURS=${DB_UPDATE_INTERVAL_HOURS:-6}
|
|
- 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
|