forked from 0xWheatyz/SPARC
ebba983a1d
- Change TokenPayload.sub type from int to str per JWT RFC 7519 - Add user_id property to TokenPayload for int conversion - Update token creation to serialize user_id as string - Update token consumers to use payload.user_id - Change dashboard port from 3000 to 8080 - Add pydantic[email] for email validation - Update default admin email to admin@sparc.dev 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
63 lines
1.5 KiB
YAML
63 lines
1.5 KiB
YAML
services:
|
|
postgres:
|
|
image: postgres:16-alpine
|
|
container_name: sparc-postgres
|
|
environment:
|
|
POSTGRES_USER: postgres
|
|
POSTGRES_PASSWORD: postgres
|
|
POSTGRES_DB: sparc
|
|
ports:
|
|
- "5432:5432"
|
|
volumes:
|
|
- postgres_data:/var/lib/postgresql/data
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U postgres"]
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 5
|
|
restart: unless-stopped
|
|
|
|
init-db:
|
|
build: .
|
|
container_name: sparc-init-db
|
|
command: python scripts/init_database.py
|
|
environment:
|
|
DATABASE_URL: postgresql://postgres:postgres@postgres:5432/sparc
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
restart: "no"
|
|
|
|
api:
|
|
build: .
|
|
container_name: sparc-api
|
|
command: uvicorn SPARC.api:app --host 0.0.0.0 --port 8000
|
|
environment:
|
|
API_KEY: ${API_KEY}
|
|
OPENROUTER_API_KEY: ${OPENROUTER_API_KEY}
|
|
DATABASE_URL: postgresql://postgres:postgres@postgres:5432/sparc
|
|
USE_CACHE: "true"
|
|
JWT_SECRET: ${JWT_SECRET:-sparc-secret-key-change-in-production}
|
|
ports:
|
|
- "8000:8000"
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
init-db:
|
|
condition: service_completed_successfully
|
|
volumes:
|
|
- ./patents:/app/patents
|
|
restart: unless-stopped
|
|
|
|
dashboard:
|
|
build: ./frontend
|
|
container_name: sparc-dashboard
|
|
ports:
|
|
- "8080:80"
|
|
depends_on:
|
|
- api
|
|
restart: unless-stopped
|
|
|
|
volumes:
|
|
postgres_data:
|