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:
@@ -35,34 +35,10 @@ services:
|
||||
ports:
|
||||
- "3000:3000"
|
||||
environment:
|
||||
# DATABASE_URL is auto-constructed from PostgreSQL credentials (not in .env.docker)
|
||||
- DATABASE_URL=postgresql://${POSTGRES_USER:-memento}:${POSTGRES_PASSWORD:-memento}@postgres:5432/${POSTGRES_DB:-memento}
|
||||
- NEXTAUTH_SECRET=${NEXTAUTH_SECRET:-changethisinproduction}
|
||||
- NEXTAUTH_URL=${NEXTAUTH_URL:-http://localhost:3000}
|
||||
- NODE_ENV=production
|
||||
- NEXT_TELEMETRY_DISABLED=1
|
||||
|
||||
# Email Configuration (SMTP)
|
||||
- SMTP_HOST=${SMTP_HOST}
|
||||
- SMTP_PORT=${SMTP_PORT:-587}
|
||||
- SMTP_USER=${SMTP_USER}
|
||||
- SMTP_PASS=${SMTP_PASS}
|
||||
- SMTP_FROM=${SMTP_FROM:-noreply@memento.app}
|
||||
|
||||
# AI Providers
|
||||
- AI_PROVIDER_TAGS=${AI_PROVIDER_TAGS}
|
||||
- AI_PROVIDER_EMBEDDING=${AI_PROVIDER_EMBEDDING}
|
||||
- AI_PROVIDER_CHAT=${AI_PROVIDER_CHAT}
|
||||
- OPENAI_API_KEY=${OPENAI_API_KEY}
|
||||
- OLLAMA_BASE_URL=${OLLAMA_BASE_URL}
|
||||
- AI_MODEL_TAGS=${AI_MODEL_TAGS}
|
||||
- AI_MODEL_EMBEDDING=${AI_MODEL_EMBEDDING}
|
||||
- AI_MODEL_CHAT=${AI_MODEL_CHAT}
|
||||
- CUSTOM_OPENAI_API_KEY=${CUSTOM_OPENAI_API_KEY}
|
||||
- CUSTOM_OPENAI_BASE_URL=${CUSTOM_OPENAI_BASE_URL}
|
||||
- ALLOW_REGISTRATION=${ALLOW_REGISTRATION:-true}
|
||||
- RESEND_API_KEY=${RESEND_API_KEY}
|
||||
- MCP_SERVER_MODE=${MCP_SERVER_MODE}
|
||||
- MCP_SERVER_URL=${MCP_SERVER_URL}
|
||||
volumes:
|
||||
- uploads-data:/app/public/uploads
|
||||
depends_on:
|
||||
@@ -100,10 +76,7 @@ services:
|
||||
# SSE mode exposes port 3001, stdio mode doesn't need ports
|
||||
- "3001:3001"
|
||||
environment:
|
||||
# Mode: 'stdio' (default, for Claude Desktop) or 'sse' (for HTTP/N8N)
|
||||
- MCP_MODE=${MCP_MODE:-stdio}
|
||||
- PORT=${MCP_PORT:-3001}
|
||||
# Database - connect to shared PostgreSQL
|
||||
# DATABASE_URL is auto-constructed from PostgreSQL credentials (not in .env.docker)
|
||||
- DATABASE_URL=postgresql://${POSTGRES_USER:-memento}:${POSTGRES_PASSWORD:-memento}@postgres:5432/${POSTGRES_DB:-memento}
|
||||
- NODE_ENV=production
|
||||
depends_on:
|
||||
@@ -113,7 +86,7 @@ services:
|
||||
networks:
|
||||
- memento-network
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "if [ \"${MCP_MODE}\" = 'sse' ]; then wget --spider -q http://localhost:3001/ || exit 1; else node -e \"console.log('healthy')\" || exit 1; fi"]
|
||||
test: ["CMD-SHELL", "wget --spider -q http://localhost:3001/ || node -e \"console.log('healthy')\""]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
|
||||
Reference in New Issue
Block a user