Files
lunarfront-app/docker-compose.dev.yml
Ryan Moon 979a9a2c00 Add user auth with JWT, switch to bun test
- User table with company_id FK, unique email, role enum
- Register/login routes with bcrypt + JWT token generation
- Auth plugin with authenticate decorator and role guards
- Login uses globally unique email (no company header needed)
- Dev-auth plugin kept as fallback when JWT_SECRET not set
- Switched from vitest to bun:test (vitest had ESM resolution
  issues with zod in Bun's module structure)
- Upgraded to zod 4
- Added Dockerfile.dev and API service to docker-compose
- 8 tests passing (health + auth)
2026-03-27 17:33:05 -05:00

64 lines
1.4 KiB
YAML

services:
api:
build:
context: .
dockerfile: Dockerfile.dev
container_name: forte-api
restart: unless-stopped
ports:
- "8000:8000"
volumes:
- ./packages:/app/packages
- ./package.json:/app/package.json
- /app/node_modules
- /app/packages/backend/node_modules
- /app/packages/shared/node_modules
environment:
DATABASE_URL: postgresql://forte:forte@postgres:5432/forte
REDIS_URL: redis://valkey:6379
JWT_SECRET: dev-secret-do-not-use-in-production
NODE_ENV: development
PORT: "8000"
HOST: "0.0.0.0"
depends_on:
postgres:
condition: service_healthy
valkey:
condition: service_healthy
postgres:
image: postgres:16
container_name: forte-postgres
restart: unless-stopped
environment:
POSTGRES_USER: forte
POSTGRES_PASSWORD: forte
POSTGRES_DB: forte
ports:
- "5432:5432"
volumes:
- forte-pgdata:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U forte"]
interval: 5s
timeout: 3s
retries: 5
valkey:
image: valkey/valkey:8
container_name: forte-valkey
restart: unless-stopped
ports:
- "6379:6379"
volumes:
- forte-valkey:/data
healthcheck:
test: ["CMD", "valkey-cli", "ping"]
interval: 5s
timeout: 3s
retries: 5
volumes:
forte-pgdata:
forte-valkey: