Files
classroomio/.env.example
T

124 lines
5.1 KiB
Bash
Raw Normal View History

2026-03-11 10:53:03 +01:00
# ClassroomIO Docker Self-Hosting Environment
# Copy this file to .env and fill in your values.
# For local development, the defaults work out of the box.
# For production, replace all placeholder values.
# ──────────────────────────────────────────────
# Required
# ──────────────────────────────────────────────
# Database (used by docker-compose to create the Postgres container)
POSTGRES_DB=classroomio
POSTGRES_USER=postgres
POSTGRES_PASSWORD=postgres
# Auth secret for session signing (use a long random string in production)
BETTER_AUTH_SECRET=replace-with-a-long-random-secret
# API bearer token (leave blank — auto-generated by ./run-docker-full-stack.sh)
AUTH_BEARER_TOKEN=
# Dashboard-to-API auth key (leave blank — auto-generated by ./run-docker-full-stack.sh)
# Must be the same value in both API and dashboard.
PRIVATE_SERVER_KEY=
# Self-hosted mode flag
PUBLIC_IS_SELFHOSTED=true
# Dashboard SSR calls to the API inside the Docker network
# Local: http://api:3081 | Production: http://api:3081 (always internal)
PRIVATE_SERVER_URL=http://api:3081
# Dashboard origin for SvelteKit CSRF protection and invite/email links
2026-03-11 10:53:03 +01:00
# Local: http://localhost:3082 | Production: https://app.yourdomain.com
# When set, invite emails and other links point here instead of app.classroomio.com
2026-03-11 10:53:03 +01:00
DASHBOARD_ORIGIN=http://localhost:3082
# Optional direct API origin. Dashboard browser calls are proxied through
# DASHBOARD_ORIGIN, so normal self-hosted auth does not need this to share a
# cookie domain with the dashboard.
# Local: http://localhost:3081 | Production fallback: https://api.yourdomain.com
PUBLIC_SERVER_URL=http://localhost:3081
# Optional comma-separated origins allowed when browsers call the API directly.
# Normal self-hosted dashboard auth/API traffic is same-origin through the dashboard proxy.
# DASHBOARD_ORIGIN is trusted automatically.
TRUSTED_ORIGINS=
2026-03-18 23:39:12 +01:00
# CSP: external domains allowed by Content-Security-Policy.
# These are runtime env vars — set them when running the container (no rebuild needed).
# Comma-separated. Include your CDN, video, and font domains. You do not need
# to add the API here for normal dashboard traffic because API calls are proxied same-origin.
2026-03-18 23:39:12 +01:00
# ALLOWED_EXTERNAL_DOMAINS overrides all per-directive vars below.
2026-03-11 10:53:03 +01:00
ALLOWED_EXTERNAL_DOMAINS=
2026-03-18 23:39:12 +01:00
# Per-directive overrides (optional, comma-separated):
# CSP_SCRIPT_SRC_DOMAINS=
# CSP_STYLE_SRC_DOMAINS=
# CSP_CONNECT_SRC_DOMAINS=
# CSP_FRAME_SRC_DOMAINS=
# CSP_FONT_SRC_DOMAINS=
# CSP_MEDIA_SRC_DOMAINS= (applies to both img-src and media-src)
2026-03-11 10:53:03 +01:00
# ──────────────────────────────────────────────
# Optional — Email (pick one approach, or skip)
# ──────────────────────────────────────────────
# Option A: Zoho / ZeptoMail
ZOHO_TOKEN=
# Option B: SMTP
SMTP_HOST=
SMTP_PORT=
SMTP_USER=
SMTP_PASSWORD=
SMTP_SENDER=
# ──────────────────────────────────────────────
# Optional — Object Storage (auto-configured by ./run-docker-full-stack.sh)
# ──────────────────────────────────────────────
# MinIO is included by default. The startup script sets these automatically.
# Change credentials in production.
MINIO_ROOT_USER=minioadmin
MINIO_ROOT_PASSWORD=minioadmin
OBJECT_STORAGE_ENDPOINT=http://minio:9000
OBJECT_STORAGE_PUBLIC_ENDPOINT=http://localhost:9000
OBJECT_STORAGE_ACCESS_KEY_ID=minioadmin
OBJECT_STORAGE_SECRET_ACCESS_KEY=minioadmin
OBJECT_STORAGE_FORCE_PATH_STYLE=true
OBJECT_STORAGE_MEDIA_PUBLIC_BASE_URL=http://localhost:9000/media
# ──────────────────────────────────────────────
# Optional — Integrations
# ──────────────────────────────────────────────
# Google OAuth
GOOGLE_CLIENT_ID=
GOOGLE_CLIENT_SECRET=
# Dashboard: Google Drive video picker (optional). Web OAuth client ID + browser API key; enable Picker API and Drive API on the same GCP project.
# PUBLIC_GOOGLE_PICKER_CLIENT_ID=
# PUBLIC_GOOGLE_PICKER_API_KEY=
2026-03-11 10:53:03 +01:00
# Dashboard domain routing
PRIVATE_APP_HOST=localhost
PRIVATE_APP_SUBDOMAINS=app
# Unsplash image search
UNSPLASH_API_KEY=
2026-04-27 11:40:38 +01:00
# AI Assistant — set at least one provider key to enable the in-course chat.
# The dashboard model picker exposes Gemini 3 Flash (Google) and GPT-4o (OpenAI).
# Anthropic is supported in code but not surfaced in the picker UI.
OPENAI_API_KEY=
GOOGLE_API_KEY=
ANTHROPIC_API_KEY=
2026-03-11 10:53:03 +01:00
# Enterprise license (SSO, token-auth, no-tracking)
LICENSE_KEY=
# Custom branding (meta tags)
# PUBLIC_APP_TITLE=My Learning Platform
# PUBLIC_APP_DESCRIPTION=A flexible LMS
# PUBLIC_OG_IMAGE_URL=https://app.yourdomain.com/og-image.png