finai/deploy/docker-compose.yml

47 lines
1.2 KiB
YAML

services:
postgres:
image: postgres:16
environment:
POSTGRES_DB: ${POSTGRES_DB:-finance_ai}
POSTGRES_USER: ${POSTGRES_USER:-finance_ai}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-finance_ai}
ports:
- "5432:5432"
volumes:
- pg_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-finance_ai} -d ${POSTGRES_DB:-finance_ai}"]
interval: 5s
timeout: 3s
retries: 20
redis:
image: redis:7
ports:
- "6379:6379"
backend:
build:
context: ../backend
environment:
DATABASE_URL: ${DATABASE_URL:-postgresql+psycopg://finance_ai:finance_ai@postgres:5432/finance_ai}
JWT_SECRET_KEY: ${JWT_SECRET_KEY:-change-me-in-production}
ALLOWED_ORIGINS: ${ALLOWED_ORIGINS:-http://localhost:5173,http://127.0.0.1:5173,http://localhost}
SMS_PROVIDER: mock
ADP_PROVIDER: mock
STORAGE_PROVIDER: local
LOCAL_STORAGE_DIR: /app/storage
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_started
ports:
- "8000:8000"
volumes:
- backend_storage:/app/storage
volumes:
pg_data:
backend_storage: