feat: add env setup wizard, fix docker-compose env passthrough and email from field

- Add interactive setup wizard (scripts/setup-env.js) with SQLite/PostgreSQL
  choice, AI provider config, email, MCP, admin account creation, and
  auto-switch of Prisma schema provider
- Fix docker-compose.yml: remove duplicate environment entries that overrode
  env_file values with empty strings (broke AI providers in Docker). Now only
  DATABASE_URL, NODE_ENV, NEXT_TELEMETRY_DISABLED remain in environment:
- Fix revalidateTag('system-config', '/settings') crash: Next.js 16 interprets
  the second arg as a cacheLife profile, not a path. Caused 500 on all admin
  settings saves
- Fix Resend "from" field: was building noreply@localhost which Resend rejects.
  Now uses SMTP_FROM from config, with localhost-aware fallback
- Add debug logging for auto-labeling background task
- Default DATABASE_URL changed from user:password to memento:memento

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Sepehr Ramezani
2026-04-21 00:29:51 +02:00
parent 19334fdafc
commit d3c2de2000
8 changed files with 1030 additions and 39 deletions

View File

@@ -13,6 +13,7 @@
"db:studio": "prisma studio",
"db:reset": "prisma migrate reset",
"db:switch": "node scripts/switch-db.js",
"setup:env": "node scripts/setup-env.js",
"test": "playwright test",
"test:ui": "playwright test --ui",
"test:headed": "playwright test --headed",
@@ -29,7 +30,6 @@
"@dnd-kit/core": "^6.3.1",
"@dnd-kit/sortable": "^10.0.0",
"@dnd-kit/utilities": "^3.2.2",
"@ducanh2912/next-pwa": "^10.2.9",
"@excalidraw/excalidraw": "^0.18.0",
"@mozilla/readability": "^0.6.0",
"@radix-ui/react-avatar": "^1.1.11",
@@ -96,6 +96,10 @@
},
"overrides": {
"serialize-javascript": "^7.0.5",
"nodemailer": "^8.0.4"
"nodemailer": "^8.0.4",
"@radix-ui/react-tabs": "^1.1.13",
"@radix-ui/react-slot": "^1.2.4",
"lodash-es": "^4.17.21",
"nanoid": "^3.3.8"
}
}