Add conditional caching and opt-in import scheduler
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user