mirror of
https://github.com/LukeHagar/pypistats.org.git
synced 2025-12-06 04:21:09 +00:00
875 B
875 B
Running locally with Docker
Prerequisites: Docker and Docker Compose.
- Build and start the full stack (Postgres, Redis, Web):
docker compose up --build
-
Configure BigQuery credentials via environment variables (e.g., export
GOOGLE_PROJECT_IDandGOOGLE_APPLICATION_CREDENTIALS_JSON). For local compose, you can add them under theweb.environmentsection indocker-compose.yml. -
The app runs on
http://localhost:3000.
Environment variables of interest:
DATABASE_URL: Postgres connection string.REDIS_URL: Redis URL.ENABLE_CRON: Set totrueto run the daily ETL.CRON_SCHEDULE: Cron string (default 2 AM UTC daily).GOOGLE_PROJECT_ID,GOOGLE_APPLICATION_CREDENTIALS_JSONorGOOGLE_APPLICATION_CREDENTIALSfor BigQuery.
The container entrypoint waits for Postgres, applies Prisma migrations, then starts the app.