mirror of
https://github.com/escalante29/WealthySmart.git
synced 2026-07-17 11:28:47 +02:00
SECRET_KEY, ADMIN_USERNAME, and ADMIN_PASSWORD no longer have working defaults: the backend refuses to boot if they are unset, default, or weak (SEC-01). Token expiry drops from 30 to 7 days (SEC-05). New COOKIE_SECURE (default true) and CORS_ORIGINS settings. Dev compose now sources credentials from .env with required-var errors instead of hardcoding them (ARCH-14); .env.example documents the template. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
90 lines
2.6 KiB
YAML
90 lines
2.6 KiB
YAML
services:
|
|
db:
|
|
image: postgres:16-alpine
|
|
container_name: wealthysmart-db-dev
|
|
environment:
|
|
POSTGRES_USER: ${POSTGRES_USER:?set POSTGRES_USER in .env}
|
|
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:?set POSTGRES_PASSWORD in .env}
|
|
POSTGRES_DB: ${POSTGRES_DB:?set POSTGRES_DB in .env}
|
|
ports:
|
|
- "5433:5432"
|
|
volumes:
|
|
- postgres_data:/var/lib/postgresql/data
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}"]
|
|
interval: 5s
|
|
timeout: 3s
|
|
retries: 5
|
|
|
|
backend:
|
|
build:
|
|
context: ./backend
|
|
dockerfile: Dockerfile
|
|
container_name: wealthysmart-backend-dev
|
|
environment:
|
|
DATABASE_URL: postgresql://${POSTGRES_USER:?}:${POSTGRES_PASSWORD:?}@db:5432/${POSTGRES_DB:?}
|
|
SECRET_KEY: ${SECRET_KEY:?set SECRET_KEY in .env (openssl rand -hex 32)}
|
|
ADMIN_USERNAME: ${ADMIN_USERNAME:?set ADMIN_USERNAME in .env}
|
|
ADMIN_PASSWORD: ${ADMIN_PASSWORD:?set ADMIN_PASSWORD in .env}
|
|
COOKIE_SECURE: "false"
|
|
VAPID_PRIVATE_KEY: ${VAPID_PRIVATE_KEY:-}
|
|
VAPID_PUBLIC_KEY: ${VAPID_PUBLIC_KEY:-}
|
|
OPENAI_API_KEY: ${OPENAI_API_KEY:-}
|
|
AGENT_MODEL: ${AGENT_MODEL:-gpt-5.4-mini}
|
|
ports:
|
|
- "8001:8000"
|
|
volumes:
|
|
- ./backend:/app
|
|
depends_on:
|
|
db:
|
|
condition: service_healthy
|
|
develop:
|
|
watch:
|
|
- path: ./backend/app
|
|
action: sync
|
|
target: /app/app
|
|
- path: ./backend/requirements.txt
|
|
action: rebuild
|
|
- path: ./backend/Dockerfile
|
|
action: rebuild
|
|
|
|
frontend:
|
|
build:
|
|
context: ./frontend
|
|
dockerfile: Dockerfile
|
|
target: dev
|
|
container_name: wealthysmart-frontend-dev
|
|
ports:
|
|
- "5175:3000"
|
|
environment:
|
|
NODE_ENV: development
|
|
AGENT_URL: http://backend:8000/api/v1/agent/agui
|
|
depends_on:
|
|
- backend
|
|
develop:
|
|
watch:
|
|
- path: ./frontend/src
|
|
action: sync
|
|
target: /app/src
|
|
- path: ./frontend/public
|
|
action: sync
|
|
target: /app/public
|
|
- path: ./frontend/server.ts
|
|
action: sync
|
|
target: /app/server.ts
|
|
- path: ./frontend/vite.config.ts
|
|
action: sync+restart
|
|
target: /app/vite.config.ts
|
|
- path: ./frontend/tsconfig.json
|
|
action: sync+restart
|
|
target: /app/tsconfig.json
|
|
- path: ./frontend/package.json
|
|
action: rebuild
|
|
- path: ./frontend/pnpm-lock.yaml
|
|
action: rebuild
|
|
- path: ./frontend/Dockerfile
|
|
action: rebuild
|
|
|
|
volumes:
|
|
postgres_data:
|