Files
hoelee 4c58d53b3c Require NOCODB_BASE_ID: drop the baked-in fallback, fail with a clear message
- monitor.py: no default base id any more, and main() now reports whichever of
  NOCODB_TOKEN / NOCODB_BASE_ID is missing (writing the same text to
  /data/health.json) instead of dying inside bootstrap with a traceback
- docker-compose.yml: NOCODB_BASE_ID is a required variable now (production
  passes it in .env, so runtime behaviour is unchanged there)
- README: the contributing note matches reality again

Verified: python test_pagination.py passes, python -m py_compile clean, and a
run without the two variables prints "NOCODB_TOKEN, NOCODB_BASE_ID not set",
writes ok:false to health.json and exits 2.
2026-10-06 16:54:45 +08:00

37 lines
1.1 KiB
YAML

# Carousell new-listing monitor -> NocoDB archive + Telegram alerts.
# Deployed via Portainer on DSM. Secrets come from the stack's environment
# (see .env.example); operational knobs (enabled / notify / interval) live in
# the NocoDB "Settings" table.
services:
carousell-monitor:
build: .
image: carousell-monitor:latest
container_name: carousell-monitor
restart: unless-stopped
extra_hosts:
- "api.telegram.org:149.154.166.110"
environment:
NOCODB_URL: ${NOCODB_URL:-http://nocodb:10380}
NOCODB_TOKEN: ${NOCODB_TOKEN}
NOCODB_BASE_ID: ${NOCODB_BASE_ID}
TELEGRAM_BOT_TOKEN: ${TELEGRAM_BOT_TOKEN}
TELEGRAM_CHAT_ID: ${TELEGRAM_CHAT_ID}
TICK_SECONDS: ${TICK_SECONDS:-60}
FETCH_GAP_SECONDS: ${FETCH_GAP_SECONDS:-1}
HEALTH_STALE_SECONDS: ${HEALTH_STALE_SECONDS:-600}
ERROR_ALERT_AFTER: ${ERROR_ALERT_AFTER:-3}
FAILURE_RATIO_THRESHOLD: ${FAILURE_RATIO_THRESHOLD:-1.0}
TZ: Asia/Kuala_Lumpur
volumes:
- carousell-data:/data
networks:
- bridge_hoelee
volumes:
carousell-data:
networks:
bridge_hoelee:
external: true