2026-06-20 22:21:47 +03:00
|
|
|
# ============================================================
|
|
|
|
|
# AI-RPG environment configuration
|
|
|
|
|
# Copy to .env and edit before running `docker compose up`.
|
|
|
|
|
# ============================================================
|
|
|
|
|
|
2026-06-19 11:28:04 +03:00
|
|
|
# === Database ===
|
|
|
|
|
POSTGRES_USER=airpg
|
2026-06-20 19:13:05 +03:00
|
|
|
POSTGRES_PASSWORD=airpg
|
|
|
|
|
POSTGRES_DB=airpg
|
2026-06-20 22:21:47 +03:00
|
|
|
# Used by backend when running OUTSIDE docker (local dev). Inside docker-compose
|
|
|
|
|
# this is overridden in docker-compose.yml to point at the `db` service.
|
|
|
|
|
DATABASE_URL=postgresql+asyncpg://airpg:airpg@localhost:5432/airpg
|
|
|
|
|
DATABASE_URL_SYNC=postgresql+psycopg2://airpg:airpg@localhost:5432/airpg
|
2026-06-19 11:28:04 +03:00
|
|
|
|
2026-06-20 19:13:05 +03:00
|
|
|
# === Qdrant ===
|
2026-06-20 22:21:47 +03:00
|
|
|
QDRANT_URL=http://localhost:6333
|
2026-06-20 19:13:05 +03:00
|
|
|
QDRANT_API_KEY=
|
2026-06-19 11:28:04 +03:00
|
|
|
|
2026-06-20 22:21:47 +03:00
|
|
|
# === LLM (OpenAI-compatible) ===
|
|
|
|
|
# Examples:
|
|
|
|
|
# OpenAI: https://api.openai.com/v1
|
|
|
|
|
# Ollama (host): http://host.docker.internal:11434/v1 ← for docker
|
|
|
|
|
# Ollama (local): http://localhost:11434/v1 ← for non-docker dev
|
|
|
|
|
# vLLM: http://localhost:8000/v1
|
|
|
|
|
# Leave empty to use MockLlmClient (replay-based, for dev/tests).
|
2026-06-20 19:13:05 +03:00
|
|
|
LLM_API_URL=http://host.docker.internal:11434/v1
|
|
|
|
|
LLM_API_KEY=
|
|
|
|
|
LLM_MODEL=qwen2.5-7b-instruct
|
|
|
|
|
LLM_TIMEOUT_SECONDS=60
|
2026-06-19 11:28:04 +03:00
|
|
|
|
2026-06-20 19:13:05 +03:00
|
|
|
# === Embeddings ===
|
2026-06-20 22:21:47 +03:00
|
|
|
# Provider: "offline_hash" (deterministic, dev-only, no HTTP) or "openai"
|
2026-06-20 19:13:05 +03:00
|
|
|
EMBEDDINGS_PROVIDER=offline_hash
|
2026-06-20 22:21:47 +03:00
|
|
|
# If provider=openai and these are empty, falls back to LLM_API_URL / LLM_API_KEY
|
2026-06-20 19:13:05 +03:00
|
|
|
EMBEDDINGS_API_URL=
|
|
|
|
|
EMBEDDINGS_API_KEY=
|
|
|
|
|
EMBEDDINGS_MODEL=text-embedding-3-small
|
2026-06-20 22:21:47 +03:00
|
|
|
# For offline_hash: 256. For openai text-embedding-3-small: 1536.
|
|
|
|
|
# Use admin "Probe dimension" button to auto-detect.
|
2026-06-20 19:13:05 +03:00
|
|
|
EMBEDDINGS_DIMENSION=256
|
|
|
|
|
|
|
|
|
|
# === Application ===
|
2026-06-20 22:21:47 +03:00
|
|
|
# Generate with: python -c "import secrets; print(secrets.token_urlsafe(48))"
|
|
|
|
|
SECRET_KEY=change-me-to-a-random-32-byte-string-min
|
2026-06-20 19:13:05 +03:00
|
|
|
DEBUG=false
|
2026-06-19 11:28:04 +03:00
|
|
|
LOG_LEVEL=INFO
|
2026-06-20 22:21:47 +03:00
|
|
|
# Comma-separated list of allowed CORS origins (or * for any)
|
|
|
|
|
CORS_ORIGINS=http://localhost:8080,http://localhost:5173,http://localhost
|
2026-06-19 11:28:04 +03:00
|
|
|
|
2026-06-20 19:13:05 +03:00
|
|
|
# === Admin setup ===
|
2026-06-20 22:21:47 +03:00
|
|
|
# Leave empty to auto-generate on first startup (will be printed in backend logs).
|
|
|
|
|
# Or set explicitly to control the URL: /register/admin?token=<ADMIN_SETUP_TOKEN>
|
2026-06-20 19:13:05 +03:00
|
|
|
ADMIN_SETUP_TOKEN=
|
2026-06-19 11:28:04 +03:00
|
|
|
|
2026-06-20 19:13:05 +03:00
|
|
|
# === Storage ===
|
|
|
|
|
DATA_DIR=/app/data
|
2026-06-19 11:30:38 +03:00
|
|
|
|
2026-06-20 22:21:47 +03:00
|
|
|
# === Frontend (Vite — ONLY used by `npm run dev`, ignored by docker build) ===
|
|
|
|
|
# The docker build bakes "/api" (relative) into the bundle so the browser
|
|
|
|
|
# uses the same origin + nginx proxies /api → backend:8000.
|
|
|
|
|
# For local `npm run dev` (outside docker), set this to the backend URL.
|
|
|
|
|
VITE_API_BASE_URL=http://localhost:8000/api
|