Adds a first-party analytics system with no third-party trackers and no persistent per-visitor identifiers: events are grouped into sessions via a daily-rotating pseudonymous hash (IP+UA+host, HMAC-salted, never stored raw). - New "Analytics" section in the Payload admin, gated by a canViewAnalytics permission on Users, following the existing custom-admin-view pattern used by the calendar feature - Sessions, page views, unique visitors, top/entry/exit pages, events, device/browser breakdown, date range filter with period comparison - Raw events and daily aggregate rollups as their own collections, with configurable retention and a cron endpoint that rolls up before purging - Cookie consent banner (necessary/preferences/statistics) with categories and copy editable from a new CMS global; a track() helper that is a complete no-op without statistics consent, so nothing is ever sent before a visitor opts in - track() calls wired into the booking flow, contact form, and navigation
98 lines
5.4 KiB
Bash
98 lines
5.4 KiB
Bash
# This file documents every variable the app/deployment actually reads.
|
|
# In production, setup.sh generates the real file at /opt/anouma/.env for
|
|
# you — you shouldn't need to hand-edit this. For local development, copy
|
|
# this to .env at the repo root and fill in DATABASE_URI/PAYLOAD_SECRET
|
|
# (see README.md → "Lokale Entwicklung").
|
|
|
|
# ── Database ────────────────────────────────────────────────────────────
|
|
# PostgreSQL connection string used by Payload. setup.sh fills this in
|
|
# automatically (host "postgres" when running the full stack via Docker
|
|
# Compose, matching POSTGRES_USER/PASSWORD/DB below). For a host-only Next
|
|
# dev server against the Dockerized Postgres, use "127.0.0.1" instead.
|
|
DATABASE_URI=postgresql://postgres:postgres@postgres:5432/anouma
|
|
|
|
# Only used by the "postgres" service in docker-compose.yml — keep these in
|
|
# sync with DATABASE_URI above (setup.sh does this for you).
|
|
POSTGRES_USER=postgres
|
|
POSTGRES_PASSWORD=replace-with-a-long-random-secret
|
|
POSTGRES_DB=anouma
|
|
|
|
# ── Core secrets ────────────────────────────────────────────────────────
|
|
# Signs Payload's auth tokens/cookies. Generate with: openssl rand -hex 32
|
|
PAYLOAD_SECRET=replace-with-a-long-random-secret
|
|
|
|
# Signs meeting join tokens (kept separate from PAYLOAD_SECRET on purpose).
|
|
# Generate with: openssl rand -hex 32
|
|
MEETING_SESSION_SECRET=replace-with-a-long-random-secret
|
|
|
|
# Salts the daily-rotating, non-reversible visitor hash used for Analytics
|
|
# session grouping (kept separate from PAYLOAD_SECRET on purpose, see
|
|
# lib/analytics/salt.ts). Generate with: openssl rand -hex 32
|
|
ANALYTICS_SALT_SECRET=replace-with-a-long-random-secret
|
|
|
|
# Sent as "Authorization: Bearer <value>" by the external cron job that
|
|
# triggers /api/cron/event-reminders. Generate with: openssl rand -hex 32
|
|
CRON_SECRET=replace-with-a-long-random-secret
|
|
|
|
# ── Public URL ──────────────────────────────────────────────────────────
|
|
# Used by Payload for absolute admin/media links, and to build meeting join
|
|
# links inside emails. Set this to the real domain in production.
|
|
NEXT_PUBLIC_SERVER_URL=http://localhost:3000
|
|
|
|
# Port the app container publishes on the host (behind a reverse proxy this
|
|
# usually doesn't need to be reachable directly — see DEPLOYMENT.md).
|
|
APP_PORT=3000
|
|
|
|
# ── Email (SMTP) ────────────────────────────────────────────────────────
|
|
# The existing ANOUMA mail system — no external newsletter service.
|
|
SMTP_HOST=
|
|
SMTP_PORT=587
|
|
SMTP_USER=
|
|
SMTP_PASSWORD=
|
|
SMTP_FROM="ANOUMA <support@anouma.org>"
|
|
|
|
# ── WebRTC (STUN/TURN) ──────────────────────────────────────────────────
|
|
# P2P works with just STUN for most networks. Add a TURN server later for
|
|
# restrictive NATs/firewalls — no code changes needed, just set these.
|
|
STUN_SERVER=stun:stun.l.google.com:19302
|
|
TURN_SERVER=
|
|
TURN_USERNAME=
|
|
TURN_PASSWORD=
|
|
|
|
# ── SEO ──────────────────────────────────────────────────────────────────
|
|
# Optional Google Search Console domain-verification token (Search Console →
|
|
# Settings → Ownership verification → HTML tag → the "content" value only).
|
|
# Leave empty if not verifying with Google. Never commit a real value here.
|
|
GOOGLE_SITE_VERIFICATION=
|
|
|
|
# ── Docker networking ───────────────────────────────────────────────────
|
|
# Internal network name for ANOUMA's own containers.
|
|
DOCKER_NETWORK=anouma-network
|
|
|
|
# Name of an existing external Docker network to join (e.g. Nginx Proxy
|
|
# Manager's network) so a reverse proxy can reach the app container
|
|
# directly. Leave empty if you don't use one — setup.sh auto-detects this.
|
|
NPM_NETWORK=
|
|
|
|
# ── Backups (used by deploy.sh) ─────────────────────────────────────────
|
|
# How long (days) to keep database backups created before every deployment.
|
|
BACKUP_RETENTION_DAYS=14
|
|
|
|
# ── Container registry & deployment (used by deploy.sh) ────────────────
|
|
# Gitea's built-in container registry. deploy.sh builds nothing — it only
|
|
# ever pulls this image (see .gitea/workflows/release.yml, which is what
|
|
# actually builds and pushes it).
|
|
REGISTRY=git.maro.run
|
|
REGISTRY_REPO=maro/anouma
|
|
# Only needed if the registry/repository requires authentication to pull.
|
|
# Use a Gitea access token as the password, not your account password.
|
|
REGISTRY_USERNAME=
|
|
REGISTRY_PASSWORD=
|
|
# Set automatically by deploy.sh on every successful deploy — do not edit
|
|
# by hand. Empty until the first release has been deployed.
|
|
ANOUMA_IMAGE=
|
|
# Informational only (shown in the setup summary) — actual automatic
|
|
# deployment is controlled by whether release.yml + its Gitea secrets are
|
|
# configured, not by this flag.
|
|
AUTO_DEPLOY=true
|