Files
WealthySmart/docker-compose.prod.yml
Carlos Escalante 8d76059ae8
All checks were successful
Deploy to VPS / deploy (push) Successful in 34s
Add budget module and push notifications for transactions
Budget: recurring items CRUD, yearly/monthly projections with no-double-count
logic, and full UI (overview, monthly detail, recurring items manager).

Push notifications: Web Push via VAPID keys, triggered on transaction creation
from n8n. Includes service worker handlers, frontend subscription flow, and
a test button on the Dashboard (temporary).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-26 22:28:14 -06:00

80 lines
2.1 KiB
YAML

services:
db:
image: postgres:16-alpine
container_name: wealthysmart-db-prod
restart: unless-stopped
environment:
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: ${POSTGRES_DB}
volumes:
- postgres_data:/var/lib/postgresql/data
networks:
- wealthysmart-network
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}"]
interval: 10s
timeout: 5s
retries: 5
backend:
build:
context: ./backend
dockerfile: Dockerfile.prod
container_name: wealthysmart-backend-prod
restart: unless-stopped
environment:
DATABASE_URL: postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@db:5432/${POSTGRES_DB}
SECRET_KEY: ${SECRET_KEY}
ADMIN_USERNAME: ${ADMIN_USERNAME}
ADMIN_PASSWORD: ${ADMIN_PASSWORD}
VAPID_PRIVATE_KEY: ${VAPID_PRIVATE_KEY}
VAPID_PUBLIC_KEY: ${VAPID_PUBLIC_KEY}
expose:
- "8000"
networks:
- wealthysmart-network
depends_on:
db:
condition: service_healthy
healthcheck:
test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:8000/')"]
interval: 15s
timeout: 5s
retries: 3
start_period: 10s
frontend:
build:
context: ./frontend
dockerfile: Dockerfile.prod
container_name: wealthysmart-frontend-prod
restart: unless-stopped
environment:
VIRTUAL_HOST: wealth.cescalante.dev
LETSENCRYPT_HOST: wealth.cescalante.dev
LETSENCRYPT_EMAIL: ${LETSENCRYPT_EMAIL}
expose:
- "80"
networks:
- wealthysmart-network
- nginx-prod-network
depends_on:
- backend
healthcheck:
test: ["CMD", "wget", "--quiet", "--tries=1", "--spider", "http://127.0.0.1/"]
interval: 30s
timeout: 10s
retries: 3
networks:
wealthysmart-network:
driver: bridge
name: wealthysmart-network-prod
nginx-prod-network:
external: true
volumes:
postgres_data:
name: wealthysmart-postgres-prod-data