docs(env): sync env example files, fix CLAUDE.md drift, add process rule#393
Merged
driaug merged 6 commits intoMay 24, 2026
Conversation
Brings the self-hosting template into parity with apps/api/.env.example and the env vars wiki. Adds (mostly commented for visibility without changing default behaviour): - NODE_ENV, DATABASE_URL, DIRECT_DATABASE_URL, REDIS_URL, PORT (Docker auto-configures these via DB_PASSWORD; the lines document overrides) - Stripe billing block (STRIPE_SK, STRIPE_WEBHOOK_SECRET, STRIPE_PRICE_*, STRIPE_METER_EVENT_NAME) - Attachments (MAX_ATTACHMENT_SIZE_MB, MAX_ATTACHMENTS_COUNT) - SMTP_ENABLED in the SMTP Server block - VERIFY_EMAIL_ON_SIGNUP in User Management - Phishing Detection block (OPENROUTER_*, PHISHING_*) Each was either present in apps/api/.env.example or documented in the wiki but missing from the production template, forcing self-hosters to read source or the wiki to discover them. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Brings the dev template into parity with the env vars wiki for variables a developer might toggle locally: - PORT (in Environment & Security) - PLUNK_FROM_ADDRESS (in Plunk API) - New sections: Notifications (NTFY_URL), Attachments, User Management (DISABLE_SIGNUPS, VERIFY_EMAIL_ON_SIGNUP), Phishing Detection All additions are commented so default local behaviour is unchanged. Vars that only make sense in the bundled Docker stack (SMTP relay ports, Minio internals, NEXT_PUBLIC_*, NGINX_PORT) are intentionally omitted. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Both variables exist in .env.self-host.example but were missing from the user-facing env vars reference, so self-hosters had to read the example file's inline comments to discover them. - MAIL_FROM_SUBDOMAIN: added a row to the AWS SES section explaining how the prefix combines with a verified domain to construct the MAIL FROM hostname, and when to override the default. - NGINX_PORT: added a new "Advanced" section for variables that almost never need tuning, with the host-port override use-case spelled out. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
CLAUDE.md listed the default as 85, but the source of truth (apps/api/src/app/constants.ts:137) and the env vars wiki both use 95. Aligning CLAUDE.md so future contributors don't propagate the stale value into new code or docs. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Plunk has three sources of truth for environment variables: 1. apps/api/.env.example — local development defaults 2. .env.self-host.example — self-hosting/production template 3. apps/wiki/content/docs/self-hosting/environment-variables.mdx — user-facing reference They have drifted repeatedly when new vars land in one location only. Codify the requirement to update all three in the same change as part of CLAUDE.md so future Claude-assisted (and human) contributions don't reintroduce the drift. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Member
|
|
Contributor
Author
|
Understood. Happy to revert the changes on |
Member
|
Just reverting the .env for self hosting is sufficient. |
This reverts commit 1c1c95d.
Contributor
Author
driaug
approved these changes
May 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Three sources describe Plunk's environment variables and they had drifted apart:
apps/api/.env.example(development defaults).env.self-host.example(production/self-host template)apps/wiki/content/docs/self-hosting/environment-variables.mdx(user-facing reference)This PR brings them into parity in one shot and adds a CLAUDE.md rule so future env-var changes are required to touch all three locations.
Type of Change
feat:New feature (MINOR version bump)fix:Bug fix (PATCH version bump)feat!:Breaking change - new feature (MAJOR version bump)fix!:Breaking change - bug fix (MAJOR version bump)docs:Documentation update (no version bump)chore:Maintenance/dependencies (no version bump)refactor:Code refactoring (no version bump)test:Adding tests (no version bump)perf:Performance improvement (PATCH version bump)Checklist
Related Issues
None