Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion backend/src/config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
import 'dotenv/config';
import { config as loadDotenv } from 'dotenv';
import { z } from 'zod';

// override: true — .env wins over inherited process env (PM2/daemon cache).
// Production incident 2026-05-13: PM2 daemon cached a revoked GITHUB_ISSUES_TOKEN
// in its env, dotenv (default no-override) silently ignored the new value in .env,
// and only a full `pm2 kill` recovered. Override removes that footgun.
loadDotenv({ override: true });

const envSchema = z.object({
DATABASE_URL: z.string(),
JWT_SECRET: z.string().min(10),
Expand Down
Loading