From 3e69579f5a171b31a253b2a42bb033bf1b97387d Mon Sep 17 00:00:00 2001 From: Paul Nothaft Date: Fri, 16 Jan 2026 08:58:02 +0100 Subject: [PATCH] docs: add API_URL environment variable to .env.example files Document the API_URL environment variable that is used for constructing URLs for assets (logos, images) in email notifications. Without this setting, the system defaults to http://localhost:3001 which causes broken images in production emails. Added to both root and backend .env.example files with clear documentation about its purpose and importance. --- .env.example | 5 +++++ backend/.env.example | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/.env.example b/.env.example index 3585dbf6..e4b61749 100644 --- a/.env.example +++ b/.env.example @@ -39,6 +39,11 @@ EMAIL_FROM=noreply@yourdomain.com FRONTEND_URL=https://yourdomain.com ADMIN_URL=https://yourdomain.com +# API URL for email assets (logos, images in notification emails) +# This must be the publicly accessible URL where email recipients can load images. +# If not set, defaults to http://localhost:3001 which will show broken images in emails. +API_URL=https://yourdomain.com/api + # Frontend API base # For pre-built images and production behind a reverse proxy, keep '/api'. # If you rebuild the frontend yourself, you may set a full URL at build time. diff --git a/backend/.env.example b/backend/.env.example index b9ca6155..fb1ce982 100644 --- a/backend/.env.example +++ b/backend/.env.example @@ -14,6 +14,11 @@ ADMIN_URL=https://photos.example.com FRONTEND_URL=https://photos.example.com BACKEND_URL=https://photos.example.com # Or https://api.photos.example.com if separate +# API URL for email assets (logos, images in emails) +# This must be the publicly accessible URL where recipients can load images +# If not set, defaults to http://localhost:3001 which will break images in production emails +API_URL=https://photos.example.com/api + # Database Configuration DATABASE_CLIENT=pg DB_HOST=localhost