Enable pageview tracking when VITE_UMAMI_WEBSITE_ID is set at frontend build time (Forgejo secret + deploy workflow), with SPA route updates and no script in local dev. Document setup in docs/umami-analytics.md, extend integritetspolicy, and add admin Webbstatistik link in prod builds. Co-authored-by: Cursor <cursoragent@cursor.com>
52 lines
1.9 KiB
Text
52 lines
1.9 KiB
Text
# BilHej Environment Variables
|
|
# Copy this file to .env and fill in your keys.
|
|
#
|
|
# cp .env.example .env
|
|
#
|
|
# Docker Compose reads .env from the project root automatically.
|
|
|
|
# ---------- PostgreSQL ----------
|
|
POSTGRES_DB=bilhej
|
|
POSTGRES_USER=bilhej
|
|
POSTGRES_PASSWORD=change_me
|
|
|
|
# ---------- JWT ----------
|
|
# Generate a secure random secret:
|
|
# openssl rand -hex 32
|
|
JWT_SECRET=change_me_to_a_random_64_char_string
|
|
|
|
# ---------- Stripe (Phase 1) ----------
|
|
# Test keys from Stripe Dashboard: https://dashboard.stripe.com/test/apikeys
|
|
STRIPE_SECRET_KEY=sk_test_...
|
|
# Webhook secret from stripe CLI: stripe listen --print-secret
|
|
STRIPE_WEBHOOK_SECRET=whsec_...
|
|
# Price ID from Stripe Dashboard: https://dashboard.stripe.com/test/products
|
|
STRIPE_PRICE_ID=price_...
|
|
|
|
# ---------- Swish (Phase 0) ----------
|
|
SWISH_NUMBER=0701234567
|
|
|
|
# ---------- App URL (password reset links in email) ----------
|
|
APP_PUBLIC_BASE_URL=http://localhost:3000
|
|
|
|
# ---------- SMTP (local Docker uses Mailpit via docker-compose.yml) ----------
|
|
# docker compose up → view mail at http://localhost:8025
|
|
# Leave MAIL_HOST unset in .env to use compose defaults (mailpit).
|
|
# Production (Resend SMTP) — see docs/production-email-checklist.md
|
|
# MAIL_HOST=smtp.resend.com
|
|
# MAIL_PORT=587
|
|
# MAIL_USERNAME=resend
|
|
# MAIL_PASSWORD=re_... # API key; never commit a real value
|
|
# MAIL_FROM=noreply@bilhej.se
|
|
|
|
# ---------- Production admin (prod profile only) ----------
|
|
# Strong password; never use test1234. Dev seeds use test@bilhej.se instead.
|
|
ADMIN_EMAIL=admin@bilhej.se
|
|
ADMIN_PASSWORD=change_me_to_a_strong_password
|
|
|
|
# ---------- Umami analytics (production frontend build only) ----------
|
|
# Baked into the frontend image at build time. Leave unset for local dev / docker compose up.
|
|
# Website ID from https://analytics.bilhej.se → Settings → Websites → BilHej
|
|
# See docs/umami-analytics.md
|
|
# VITE_UMAMI_WEBSITE_ID=
|
|
# VITE_UMAMI_SCRIPT_URL=https://analytics.bilhej.se/script.js
|