79 lines
2.5 KiB
YAML
79 lines
2.5 KiB
YAML
|
|
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:
|
|
- "127.0.0.1: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}
|
|
APP_ORIGIN: ${APP_ORIGIN:-http://localhost:5173}
|
|
UPDATE_NOTICE_VERSION: ${UPDATE_NOTICE_VERSION:-0}
|
|
UPDATE_NOTICE_TITLE: ${UPDATE_NOTICE_TITLE:-SkyMoney Updated}
|
|
UPDATE_NOTICE_BODY: ${UPDATE_NOTICE_BODY:-We shipped improvements and fixes. Please review the latest changes.}
|
|
SMTP_HOST: ${SMTP_HOST:-}
|
|
SMTP_PORT: ${SMTP_PORT:-587}
|
|
SMTP_REQUIRE_TLS: ${SMTP_REQUIRE_TLS:-true}
|
|
SMTP_TLS_REJECT_UNAUTHORIZED: ${SMTP_TLS_REJECT_UNAUTHORIZED:-true}
|
|
SMTP_USER: ${SMTP_USER:-}
|
|
SMTP_PASS: ${SMTP_PASS:-}
|
|
EMAIL_FROM: ${EMAIL_FROM:-SkyMoney <noreply@skymoneybudget.com>}
|
|
EMAIL_BOUNCE_FROM: ${EMAIL_BOUNCE_FROM:-bounces@skymoneybudget.com}
|
|
EMAIL_REPLY_TO: ${EMAIL_REPLY_TO:-support@skymoneybudget.com}
|
|
|
|
depends_on:
|
|
- postgres
|
|
ports:
|
|
- "127.0.0.1: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:
|