Files
adilallo f7d88a7d5c Let Cloudron turn on named admins, the ops token, and Umami after the image is built.
Tracker env is read at request time and the CSP already allows the analytics host, so staging can set a rule admin, an ops bearer token, and the cookieless Umami site without rebuilding.
2026-11-23 11:51:55 -07:00

71 lines
3.4 KiB
Bash

# Copy to `.env` for local development (never commit real secrets).
# PostgreSQL — use `docker compose up -d postgres` and match user/db/password.
CLOUDRON_POSTGRESQL_URL="postgresql://communityrule:communityrule@localhost:5432/communityrule"
# Session signing + secret used when hashing magic-link tokens. Min 16 characters; use a long random string in production.
SESSION_SECRET="dev-only-change-me-16chars-min"
# Optional Mailhog (docker compose mailhog service):
# CLOUDRON_MAIL_SMTP_SERVER=localhost
# CLOUDRON_MAIL_SMTP_PORT=1025
# CLOUDRON_MAIL_SMTP_USERNAME=
# CLOUDRON_MAIL_SMTP_PASSWORD=
# Leave mail vars unset in dev to log the magic-link verify URL to the server console instead of sending email.
SMTP_FROM="CommunityRule <noreply@localhost>"
# /privacy. Unset or any value other than `true` is off (404, no footer/login/email links).
# Staging: `true`. Production stays off until university counsel has read the policy.
# Only ENABLE_PRIVACY_POLICY counts. It is read at runtime on Cloudron.
# A build-time NEXT_PUBLIC_ENABLE_PRIVACY_POLICY value does not turn the page on.
# ENABLE_PRIVACY_POLICY=true
# CR-107: inbox for Ask an organizer form submissions (requires CLOUDRON_MAIL_SMTP_* in production).
ORGANIZER_INQUIRY_TO=
# Workshop sign-up inbox. Leave unset until the address is approved. The form still saves the row.
WORKSHOP_INQUIRY_TO=
# Optional calendar link for organizations of 1,000 members or more. Shown on the confirmation and in the reply email.
NEXT_PUBLIC_WORKSHOP_SCHEDULING_URL=
# Shared token for /workshop-inquiries and the CSV export. Unset hides the page.
WORKSHOP_INQUIRY_ADMIN_TOKEN=
# Bearer token for POST /api/workshop-inquiries/purge (retry unsent mail, delete inquiries older than 12 months).
WORKSHOP_INQUIRY_PURGE_TOKEN=
# Bearer token for POST /api/ops/prune (expired sessions, unused links, old workshop inquiries). Unset hides the route.
OPS_PRUNE_TOKEN=
# Set to `true` to sync the create-flow draft with `/api/drafts/me` when the user is signed in.
# Server draft sync (default on). Set to `false` to disable PUT/GET /api/drafts/me.
NEXT_PUBLIC_ENABLE_BACKEND_SYNC=
# Web vitals API (CR-80): `external` = structured logs only, no writes under `.next` (default in production).
# `local` = file-based aggregates under `.next/web-vitals` (default in development). Omit to use defaults.
# WEB_VITALS_STORAGE=external
# Optional: URL shown on /monitor when using external storage (Grafana, Kibana, vendor RUM, etc.).
# NEXT_PUBLIC_RUM_DASHBOARD_URL=
# Search indexing. Unset: only communityrule.com / communityrule.info are crawlable
# (staging and local are disallowed in robots.txt). Set true/false to override.
# SITE_INDEXING=true
# SITE_INDEXING=false
# Named admins who may open a private Rule. Comma-separated emails. Every such read is logged.
# The same list can open /rule-counts (finished Rules by group type and place).
# RULE_ADMIN_EMAILS=ops@example.org
# Optional Umami (self-hosted beside the app). Unset: no tracker script.
# Cookie-free / no-cookies is an Umami server setting.
# Read at request time on Cloudron, so `cloudron env set` does not need a rebuild.
# NEXT_PUBLIC_UMAMI_SRC=https://analytics.example.com/script.js
# NEXT_PUBLIC_UMAMI_WEBSITE_ID=
# Writable directory for `POST /api/uploads` (community photo + custom-method attachments).
# In production (e.g. Cloudron localstorage mount), set to the mounted path. Local dev example:
# UPLOAD_ROOT="/absolute/path/to/community-rule/var/uploads"