Move ingestion + Telegram/Bale/Divar config to DB-backed admin settings
- AppSetting gains source config: AutoIngestEnabled, IngestIntervalMinutes, Telegram/Bale/Divar enabled+channels/token/queries - IListingSource.FetchAsync(AppSetting) — sources read config from DB, not IOptions/appsettings; sample source dev-only - IngestionWorker reads AutoIngest+interval from DB each cycle (toggle at runtime, no redeploy) - /Admin/Settings gets a 'منابع جمعآوری' section; removed Ingestion env/appsettings + compose env vars - ENV_FILE shrinks to HOST_PORT + POSTGRES_* + ADMIN_PHONE (AI + sources are all in-admin); migration Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
+1
-8
@@ -23,14 +23,7 @@ services:
|
||||
ASPNETCORE_URLS: "http://+:8080"
|
||||
ConnectionStrings__Default: "Host=db;Port=5432;Database=${POSTGRES_DB:-hamkadr};Username=${POSTGRES_USER:-hamkadr};Password=${POSTGRES_PASSWORD}"
|
||||
Auth__AdminPhone: "${ADMIN_PHONE:-}"
|
||||
# Channel scraping (optional; enable + configure via ENV_FILE)
|
||||
Ingestion__Enabled: "${INGESTION_ENABLED:-false}"
|
||||
Ingestion__IntervalMinutes: "${INGESTION_INTERVAL_MINUTES:-30}"
|
||||
Ingestion__Telegram__Enabled: "${TELEGRAM_ENABLED:-false}"
|
||||
Ingestion__Telegram__BotToken: "${TELEGRAM_BOT_TOKEN:-}"
|
||||
Ingestion__Bale__Enabled: "${BALE_ENABLED:-false}"
|
||||
Ingestion__Bale__BotToken: "${BALE_BOT_TOKEN:-}"
|
||||
Ingestion__Divar__Enabled: "${DIVAR_ENABLED:-false}"
|
||||
# Ingestion + AI + channel sources are configured at runtime in /Admin/Settings (DB), not here.
|
||||
# healthcheck is defined in the Dockerfile (bash /dev/tcp probe) so the deploy
|
||||
# job's `docker inspect Health.Status` wait works.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user