Files
codeboard/docker-compose.yml
Vectry 64ce70daa4 feat: add subscription service — user auth, Stripe billing, API keys, dashboard
- NextAuth v5 with email+password credentials, JWT sessions
- Registration, login, email verification, password reset flows
- Stripe integration: Free (15/day), Starter ($5/1k/mo), Pro ($20/100k/mo)
- API key management (cb_ prefix) with hash-based validation
- Dashboard with generations history, settings, billing management
- Rate limiting: Redis daily counter (free), DB monthly (paid)
- Generate route auth: Bearer API key + session, anonymous allowed
- Worker userId propagation for generation history
- Pricing section on landing page, auth-aware navbar
- Middleware with route protection, CORS for codeboard.vectry.tech
- Docker env vars for auth, Stripe, email (smtp.migadu.com)
2026-02-10 20:08:13 +00:00

89 lines
2.4 KiB
YAML

services:
web:
build:
context: .
target: web
ports:
- "4100:3000"
environment:
- REDIS_URL=redis://redis:6379
- DATABASE_URL=postgresql://codeboard:codeboard@postgres:5432/codeboard
- AUTH_SECRET=${AUTH_SECRET:-}
- AUTH_URL=https://codeboard.vectry.tech
- STRIPE_SECRET_KEY=${STRIPE_SECRET_KEY:-}
- STRIPE_WEBHOOK_SECRET=${STRIPE_WEBHOOK_SECRET:-}
- STRIPE_STARTER_PRICE_ID=price_1SzMQbR8i0An4Wz70Elgk5Zd
- STRIPE_PRO_PRICE_ID=price_1SzMQrR8i0An4Wz7UseMs0yy
- EMAIL_FROM=CodeBoard <noreply@vectry.tech>
- EMAIL_HOST=smtp.migadu.com
- EMAIL_PORT=465
- EMAIL_SECURE=true
- EMAIL_USER=hunter@repi.fun
- EMAIL_PASSWORD=${EMAIL_PASSWORD:-}
- NEXT_PUBLIC_APP_URL=https://codeboard.vectry.tech
depends_on:
redis:
condition: service_started
postgres:
condition: service_healthy
migrate:
condition: service_completed_successfully
restart: always
worker:
build:
context: .
target: worker
environment:
- REDIS_URL=redis://redis:6379
- DATABASE_URL=postgresql://codeboard:codeboard@postgres:5432/codeboard
- OPENAI_API_KEY=${OPENAI_API_KEY:-}
- ANTHROPIC_API_KEY=${ANTHROPIC_API_KEY:-}
- LLM_MODEL=${LLM_MODEL:-kimi-k2-turbo-preview}
- LLM_BASE_URL=${LLM_BASE_URL:-https://api.moonshot.ai/v1}
depends_on:
redis:
condition: service_started
postgres:
condition: service_healthy
migrate:
condition: service_completed_successfully
restart: always
postgres:
image: postgres:16-alpine
environment:
- POSTGRES_USER=codeboard
- POSTGRES_PASSWORD=codeboard
- POSTGRES_DB=codeboard
volumes:
- codeboard_postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U codeboard"]
interval: 5s
timeout: 5s
retries: 5
restart: always
migrate:
build:
context: .
target: builder
command: npx prisma migrate deploy --schema=packages/database/prisma/schema.prisma
environment:
- DATABASE_URL=postgresql://codeboard:codeboard@postgres:5432/codeboard
depends_on:
postgres:
condition: service_healthy
restart: "no"
redis:
image: redis:7-alpine
volumes:
- codeboard_redis_data:/data
restart: always
volumes:
codeboard_postgres_data:
codeboard_redis_data: