docker-compose.yml
Rama main · réplica de lectura del repositorio original.
name: contribution-tracker
services:
db:
image: postgres:16-alpine
restart: unless-stopped
environment:
POSTGRES_USER: arena
POSTGRES_PASSWORD: arena
POSTGRES_DB: arena
ports:
- "${DB_PORT:-5439}:5432"
volumes:
- pgdata:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U arena -d arena"]
interval: 5s
timeout: 3s
retries: 10
web:
build: .
restart: unless-stopped
depends_on:
db:
condition: service_healthy
environment:
DATABASE_URL: postgres://arena:arena@db:5432/arena
GITHUB_TOKEN: ${GITHUB_TOKEN:-}
SYNC_SINCE: ${SYNC_SINCE:-}
INCLUDE_OWN_REPOS: ${INCLUDE_OWN_REPOS:-false}
REQUIRED_ORG: ${REQUIRED_ORG:-}
APP_TZ: ${APP_TZ:-UTC}
TZ: ${APP_TZ:-UTC}
CRON_SECRET: ${CRON_SECRET:-}
BURGER_ADMINS: ${BURGER_ADMINS:-}
BURGER_PAYERS: ${BURGER_PAYERS:-}
BURGER_SINCE: ${BURGER_SINCE:-}
GITHUB_OAUTH_CLIENT_ID: ${GITHUB_OAUTH_CLIENT_ID:-}
GITHUB_OAUTH_CLIENT_SECRET: ${GITHUB_OAUTH_CLIENT_SECRET:-}
AUTH_SECRET: ${AUTH_SECRET:-}
ports:
- "${WEB_PORT:-3000}:3000"
# Nightly sync. Sleeps until 02:00 in APP_TZ, pulls from GitHub, repeats —
# so the Sync now button in the header is only ever needed for an early look.
# Matches the Vercel cron in vercel.json, so both deploy paths behave alike.
sync:
build: .
restart: unless-stopped
depends_on:
- web
environment:
SYNC_URL: http://web:3000/api/sync
APP_TZ: ${APP_TZ:-UTC}
TZ: ${APP_TZ:-UTC}
SYNC_HOUR: ${SYNC_HOUR:-2}
CRON_SECRET: ${CRON_SECRET:-}
command: ["node", "scripts/scheduler.mjs"]
volumes:
pgdata: