Files
rustyip/.env.example
T
NetworkCatsandClaude Opus 4.7 4ba00fadf5 feat: poll MMDB every 6 hours to mitigate upstream release drift
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>
2026-04-22 07:26:57 +00:00

36 lines
1.3 KiB
Bash

# Server listen address
LISTEN_ADDR=0.0.0.0:3000
# Path to the MaxMind DB file (use data/Merged-IP.mmdb for local development)
DB_PATH=data/Merged-IP.mmdb
# URL to download the MMDB database from
DB_UPDATE_URL=https://github.com/NetworkCats/Merged-IP-Data/releases/latest/download/Merged-IP.mmdb
# Update schedule: anchor time (HH:MM) + interval in hours.
# Interval must divide 24 evenly (1, 2, 3, 4, 6, 8, 12, 24).
# Default = every 6h starting at 00:20 UTC -> runs at 00:20, 06:20, 12:20, 18:20.
# Upstream mergedipdb cron targets 01:00 UTC but GitHub Actions schedule
# latency can push the actual release anywhere from ~01:05 to ~06:00+ UTC,
# so we poll 4x/day to catch it whenever it lands.
DB_UPDATE_TIME_UTC=00:20
DB_UPDATE_INTERVAL_HOURS=6
# Site domain name (used for display/metadata)
SITE_DOMAIN=localhost
# IPv4-only domain for dual-stack detection (e.g., noipv6.org)
# Leave empty to disable IPv4 detection for IPv6 users
IPV4_DOMAIN=
# Enable development mode (uses 1.1.1.1 as fallback when CF-Connecting-IP is absent)
DEV_MODE=false
# Path to the TLS certificate directory for HAProxy (main domain)
# The directory must contain origin.pem (combined cert + key)
CERT_PATH=./haproxy/certs
# Path to the TLS certificate directory for the IPv4-only domain
# The directory must contain origin.pem (combined cert + key)
IPV4_CERT_PATH=./haproxy/certs-ipv4