Move ingestion + Telegram/Bale/Divar config to DB-backed admin settings
CI/CD / CI · dotnet build (push) Successful in 6m22s
CI/CD / Deploy · hamkadr (push) Failing after 3s

- 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:
soroush.asadi
2026-06-04 00:44:11 +03:30
parent 6cfdd16c42
commit 3c08c1a265
20 changed files with 1217 additions and 167 deletions
+1 -8
View File
@@ -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.