Files
WealthySmart/docker-compose.yml
Carlos Escalante 140a75f706 Add cookie-based SPA auth and update container plumbing
Backend now exposes /api/auth/login + /api/auth/logout setting an
httpOnly ws_token cookie, and get_current_user accepts either the
cookie (SPA) or a Bearer token (n8n/CLI). AuthContext probes the
cookie via /api/v1/auth/me. Dockerfiles and compose files updated
for the new agent service deps and CopilotKit dev sidecar.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-29 22:02:02 -06:00

86 lines
2.2 KiB
YAML

services:
db:
image: postgres:16-alpine
container_name: wealthysmart-db-dev
environment:
POSTGRES_USER: wealthy_user
POSTGRES_PASSWORD: wealthy_pass
POSTGRES_DB: wealthysmart
ports:
- "5433:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U wealthy_user -d wealthysmart"]
interval: 5s
timeout: 3s
retries: 5
backend:
build:
context: ./backend
dockerfile: Dockerfile
container_name: wealthysmart-backend-dev
environment:
DATABASE_URL: postgresql://wealthy_user:wealthy_pass@db:5432/wealthysmart
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: