mirror of
https://github.com/LukeHagar/pypistats.org.git
synced 2025-12-06 04:21:09 +00:00
54 lines
1.1 KiB
YAML
54 lines
1.1 KiB
YAML
version: '3.9'
|
|
|
|
services:
|
|
db:
|
|
image: postgres:16
|
|
environment:
|
|
POSTGRES_DB: pypistats
|
|
POSTGRES_USER: pypistats
|
|
POSTGRES_PASSWORD: pypistats
|
|
volumes:
|
|
- pgdata:/var/lib/postgresql/data
|
|
ports:
|
|
- "5432:5432"
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U $$POSTGRES_USER -d $$POSTGRES_DB"]
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 20
|
|
|
|
redis:
|
|
image: redis:7
|
|
ports:
|
|
- "6379:6379"
|
|
healthcheck:
|
|
test: ["CMD", "redis-cli", "ping"]
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 20
|
|
|
|
web:
|
|
build: .
|
|
depends_on:
|
|
db:
|
|
condition: service_healthy
|
|
redis:
|
|
condition: service_healthy
|
|
environment:
|
|
NODE_ENV: production
|
|
PORT: 3000
|
|
DATABASE_URL: postgresql://pypistats:pypistats@db:5432/pypistats?schema=public
|
|
REDIS_URL: redis://redis:6379
|
|
ENABLE_CRON: "true"
|
|
# Set your BigQuery project and credentials
|
|
# GOOGLE_PROJECT_ID: your-project
|
|
# GOOGLE_APPLICATION_CREDENTIALS_JSON: '{"type":"service_account",...}'
|
|
ports:
|
|
- "3000:3000"
|
|
command: ["/entrypoint.sh"]
|
|
|
|
volumes:
|
|
pgdata:
|
|
|
|
|