services: postgres: image: postgres:15 environment: POSTGRES_DB: ${POSTGRES_DB:-skymoney} POSTGRES_USER: ${POSTGRES_USER:-app} POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-app} volumes: - pgdata:/var/lib/postgresql/data ports: - "5432:5432" restart: unless-stopped healthcheck: test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-app} -d ${POSTGRES_DB:-skymoney}"] interval: 5s timeout: 3s retries: 10 api: build: context: ./api dockerfile: Dockerfile environment: NODE_ENV: ${NODE_ENV:-production} PORT: ${PORT:-8080} DATABASE_URL: ${DATABASE_URL:-postgres://app:app@postgres:5432/skymoney} CORS_ORIGIN: ${CORS_ORIGIN:-https://skymoneybudget.com} SEED_DEFAULT_BUDGET: ${SEED_DEFAULT_BUDGET:-0} AUTH_DISABLED: ${AUTH_DISABLED:-false} JWT_SECRET: ${JWT_SECRET:-dev-jwt-secret-change-me} COOKIE_SECRET: ${COOKIE_SECRET:-dev-cookie-secret-change-me} depends_on: - postgres ports: - "8081:8080" restart: unless-stopped healthcheck: test: ["CMD-SHELL", "wget -qO- http://localhost:8080/health || exit 1"] interval: 5s timeout: 3s retries: 10 start_period: 10s scheduler: build: context: ./api dockerfile: Dockerfile command: ["node", "dist/worker/rollover.js"] environment: NODE_ENV: ${NODE_ENV:-production} DATABASE_URL: ${DATABASE_URL:-postgres://app:app@postgres:5432/skymoney} ROLLOVER_SCHEDULE_CRON: "${ROLLOVER_SCHEDULE_CRON:-0 6 * * *}" restart: unless-stopped depends_on: - postgres healthcheck: test: ["CMD-SHELL", "node -e \"process.exit(0)\""] interval: 60s timeout: 5s retries: 3 volumes: pgdata: