Add conditional caching and opt-in import scheduler

This commit is contained in:
ik
2026-09-03 08:04:57 +07:00
parent ddd8b84055
commit a528fc707f
13 changed files with 248 additions and 9 deletions
+15
View File
@@ -72,6 +72,21 @@ services:
condition: service_healthy
command: ["sh", "-c", "alembic upgrade head && python -m app.cli import-records"]
scheduler:
build: ./apps/api
profiles: ["scheduler"]
restart: unless-stopped
environment:
DATABASE_URL: postgresql+psycopg://rf4:rf4_local@db:5432/rf4_spotter
OFFICIAL_RECORDS_URL: ${OFFICIAL_RECORDS_URL:-https://rf4game.de/records/region/RU/}
OFFICIAL_RECORDS_REGION: ${OFFICIAL_RECORDS_REGION:-RU}
OFFICIAL_RECORDS_CATEGORY: ${OFFICIAL_RECORDS_CATEGORY:-records}
IMPORT_INTERVAL_SECONDS: ${IMPORT_INTERVAL_SECONDS:-3600}
depends_on:
api:
condition: service_healthy
command: ["python", "-m", "app.scheduler"]
volumes:
postgres_data:
minio_data: