Files
classroomio/.env.example
T

131 lines
6.0 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.
# ──────────────────────────────────────────────
# Image version (only used by docker-compose.images.yaml — the pull-based stack)
# ──────────────────────────────────────────────
# Which published image tag to pull for api/dashboard/jobs.
# - Pin to a release (e.g. 1.4.2) in production so a new release never auto-breaks you.
# - "latest" = newest stable release. "edge" = bleeding edge (last main build).
# Rollback = set this back to the previous version, then `... pull && up -d`.
CIO_VERSION=latest
2026-03-11 10:53:03 +01:00
# ──────────────────────────────────────────────
# 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. REQUIRED — the stack refuses to start if this is empty.
BETTER_AUTH_SECRET=
2026-03-11 10:53:03 +01:00
# Dashboard-to-API auth key (leave blank — auto-generated by ./run-docker-full-stack.sh).
2026-03-11 10:53:03 +01:00
# Must be the same value in both API and dashboard.
PRIVATE_SERVER_KEY=
# Self-hosted mode flag.
# Note: for the dashboard this is a BUILD-TIME value (baked into the client bundle via a
# Docker build arg). The published dashboard image is built with PUBLIC_IS_SELFHOSTED=true;
# changing it at runtime has no effect on an already-built image.
2026-03-11 10:53:03 +01:00
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 (SMTP, or skip)
2026-03-11 10:53:03 +01:00
# ──────────────────────────────────────────────
# SMTP
2026-03-11 10:53:03 +01:00
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. On first run ./run-docker-full-stack.sh RANDOMIZES the
# MinIO credentials below and mirrors them into OBJECT_STORAGE_ACCESS_KEY_ID/SECRET.
# These minioadmin placeholders are only used if you skip the script.
2026-03-11 10:53:03 +01:00
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