Files
classroomio/apps/dashboard/.env.example
T
35f5216839 fix(org): favicon fallback, OG logo styling, and Discord embed CDN URLs (#714)
* fix(org): serve OG images from CDN for Discord embeds

Discord times out on slow dynamic OG generation (~3-5s). Persist generated
images to R2, point meta tags at the media CDN, and warm the API endpoint
on org-site page loads so crawlers get a fast static PNG URL.

Co-authored-by: Rotimi Best <rotimi-best@users.noreply.github.com>

* docs: add org-site Open Graph and favicon guides

Document user-facing sharing behavior and contributor architecture
for dynamic OG images, favicon fallback, R2/CDN caching, and embed
cache invalidation.

Co-authored-by: Rotimi Best <rotimi-best@users.noreply.github.com>

* fix(org-site): address PR review on OG CDN fallback and docs

- Fall back to API OG URL when CDN object is not yet available (HEAD check)
- Cancel warm-fetch response body to avoid connection pool exhaustion
- Align tenant-router OG edge cache TTL with one-hour API revalidation
- Fix favicon docs navigation and add Custom Domain tab screenshot
- Replace Chiberry Artistry example with AI Academy

Co-authored-by: Rotimi Best <rotimi-best@users.noreply.github.com>

* fix(org-site): accept docker hostnames for OG warm URL

Use isValidHttpUrl for PRIVATE_SERVER_URL so internal values like
http://api:3081 work for SSR warm fetches in Docker Compose.

Co-authored-by: Rotimi Best <rotimi-best@users.noreply.github.com>

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: Rotimi Best <rotimi-best@users.noreply.github.com>
2026-07-09 13:38:49 +01:00

66 lines
2.8 KiB
Bash

# Selfhosting - should be true if you are selfhosting
PUBLIC_IS_SELFHOSTED=false
# Self-hosted meta tags (optional) - override title, description, and OG image for custom branding
# PUBLIC_APP_TITLE=My Learning Platform
# PUBLIC_APP_DESCRIPTION=A flexible LMS for your organization
# PUBLIC_OG_IMAGE_URL=https://app.yourdomain.com/og-image.png
# CSP: External domains allowed by Content-Security-Policy.
# These are runtime env vars — set them when running the container (no rebuild needed).
# When PUBLIC_IS_SELFHOSTED=true: starts with 'self' only; add your domains here.
# When PUBLIC_IS_SELFHOSTED=false: unset uses SaaS defaults.
# Comma-separated, e.g. ALLOWED_EXTERNAL_DOMAINS=assets.cdn.clsrio.com,cdnjs.cloudflare.com,cdn.plyr.io
# ALLOWED_EXTERNAL_DOMAINS overrides all per-directive vars below.
# ALLOWED_EXTERNAL_DOMAINS=
# 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)
# CSP_FRAME_ANCESTORS_DOMAINS= (extra parents allowed to iframe this app; appended after 'self'. Overridden by ALLOWED_EXTERNAL_DOMAINS when set.)
# Example: CSP_FRAME_ANCESTORS_DOMAINS=http://localhost:5180
# Google Drive video picker (lesson editor). OAuth Web client ID + Browser API key from Google Cloud Console (Picker API + Drive API enabled).
# PUBLIC_GOOGLE_PICKER_CLIENT_ID=
# PUBLIC_GOOGLE_PICKER_API_KEY=
# Unsplash setup - Optional if you want to use Unsplash images
UNSPLASH_API_KEY=
# Sever URL - Optional if you want to use video upload and pdf downloads
# This is the deployment URL of apps/api
PUBLIC_SERVER_URL=
# Public CDN base for uploaded media (org OG images are served from /og/{siteName}.png)
# PUBLIC_MEDIA_CDN_URL=https://img.cdn.clsrio.com
# Optional server-only override used during SSR (for Docker/internal network)
# Example in compose: http://api:3081
PRIVATE_SERVER_URL=
# Domain management - should be your domain
# The final domain is app.classroomio.com where `app` is PRIVATE_APP_SUBDOMAINS and `classroomio.com` is PRIVATE_APP_HOST
PRIVATE_APP_HOST=classroomio.com
PRIVATE_APP_SUBDOMAINS=app
# Polar (SvelteKit routes: /api/polar/subscribe, portal, webhook, buy-tokens)
POLAR_ACCESS_TOKEN=
POLAR_WEBHOOK_SECRET=
POLAR_TOKEN_PACK_PRODUCT_ID=
# Sentry (client-side error tracking). Leave PUBLIC_SENTRY_DSN unset to disable.
PUBLIC_SENTRY_DSN=
PUBLIC_SENTRY_ENVIRONMENT=production
PUBLIC_SENTRY_TRACES_SAMPLE_RATE=0
PUBLIC_SENTRY_REPLAYS_SESSION_SAMPLE_RATE=0
PUBLIC_SENTRY_REPLAYS_ON_ERROR_SAMPLE_RATE=1
# Upload file size limits (megabytes). Must match apps/api/.env for self-hosted installs.
# UPLOAD_MAX_DOCUMENT_MB=5
# UPLOAD_MAX_IMAGE_MB=5
# UPLOAD_MAX_VIDEO_MB=800
# UPLOAD_MAX_EXERCISE_FILE_MB=2
# UPLOAD_MAX_AGENT_DOCUMENT_MB=5
# UPLOAD_MAX_LANDING_IMAGE_MB=0.5
# UPLOAD_MAX_THUMBNAIL_MB=5