diff --git a/.env.example b/.env.example index 54e44c5..4cbd157 100644 --- a/.env.example +++ b/.env.example @@ -1,35 +1,129 @@ -# Database (port 5433 avoids conflict with host PostgreSQL) +# ───────────────────────────────────────────────────────────────────────────── +# Mosaic — Environment Variables Reference +# Copy this file to .env and fill in the values for your deployment. +# Lines beginning with # are comments; optional vars are commented out. +# ───────────────────────────────────────────────────────────────────────────── + + +# ─── Database (PostgreSQL 17 + pgvector) ───────────────────────────────────── +# Full connection string used by the gateway, ORM, and migration runner. +# Port 5433 avoids conflict with a host-side PostgreSQL instance. DATABASE_URL=postgresql://mosaic:mosaic@localhost:5433/mosaic -# Valkey (Redis-compatible, port 6380 avoids conflict with host Redis/Valkey) +# Docker Compose host-port override for the PostgreSQL container (default: 5433) +# PG_HOST_PORT=5433 + + +# ─── Queue (Valkey 8 / Redis-compatible) ───────────────────────────────────── +# Port 6380 avoids conflict with a host-side Redis/Valkey instance. VALKEY_URL=redis://localhost:6380 -# Docker Compose host port overrides (optional) -# PG_HOST_PORT=5433 +# Docker Compose host-port override for the Valkey container (default: 6380) # VALKEY_HOST_PORT=6380 -# OpenTelemetry -OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4318 -OTEL_SERVICE_NAME=mosaic-gateway -# Auth (BetterAuth) -BETTER_AUTH_SECRET=change-me-to-a-random-32-char-string -BETTER_AUTH_URL=http://localhost:4000 - -# Gateway +# ─── Gateway ───────────────────────────────────────────────────────────────── +# TCP port the NestJS/Fastify gateway listens on (default: 4000) GATEWAY_PORT=4000 + +# Comma-separated list of allowed CORS origins. +# Must include the web app origin in production. GATEWAY_CORS_ORIGIN=http://localhost:3000 -# Discord Plugin (optional — set DISCORD_BOT_TOKEN to enable) + +# ─── Auth (BetterAuth) ─────────────────────────────────────────────────────── +# REQUIRED — random secret used to sign sessions and tokens. +# Generate with: openssl rand -base64 32 +BETTER_AUTH_SECRET=change-me-to-a-random-32-char-string + +# Public base URL of the gateway (used by BetterAuth for callback URLs) +BETTER_AUTH_URL=http://localhost:4000 + + +# ─── Web App (Next.js) ─────────────────────────────────────────────────────── +# Public gateway URL — accessible from the browser, not just the server. +NEXT_PUBLIC_GATEWAY_URL=http://localhost:4000 + + +# ─── OpenTelemetry ─────────────────────────────────────────────────────────── +# OTLP HTTP endpoint (otel-collector or any OpenTelemetry-compatible backend) +OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4318 + +# Service name shown in traces +OTEL_SERVICE_NAME=mosaic-gateway + + +# ─── AI Providers ──────────────────────────────────────────────────────────── + +# Ollama (local models — set OLLAMA_BASE_URL to enable) +# OLLAMA_BASE_URL=http://localhost:11434 +# OLLAMA_HOST is a legacy alias for OLLAMA_BASE_URL +# OLLAMA_HOST=http://localhost:11434 +# Comma-separated list of Ollama model IDs to register (default: llama3.2,codellama,mistral) +# OLLAMA_MODELS=llama3.2,codellama,mistral + +# OpenAI — required for embedding and log-summarization features +# OPENAI_API_KEY=sk-... + +# Custom providers — JSON array of provider configs +# Format: [{"id":"","baseUrl":"","apiKey":"","models":[{"id":"","name":"