- 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>
137 lines
3.7 KiB
YAML
137 lines
3.7 KiB
YAML
services:
|
|
# ============================================
|
|
# PostgreSQL - Shared Database
|
|
# ============================================
|
|
postgres:
|
|
image: postgres:16-alpine
|
|
container_name: memento-postgres
|
|
restart: unless-stopped
|
|
environment:
|
|
POSTGRES_USER: ${POSTGRES_USER:-memento}
|
|
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-memento}
|
|
POSTGRES_DB: ${POSTGRES_DB:-memento}
|
|
volumes:
|
|
- postgres-data:/var/lib/postgresql/data
|
|
ports:
|
|
- "5432:5432"
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-memento}"]
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 5
|
|
networks:
|
|
- memento-network
|
|
|
|
# ============================================
|
|
# memento-note - Next.js Web Application
|
|
# ============================================
|
|
memento-note:
|
|
build:
|
|
context: ./memento-note
|
|
dockerfile: Dockerfile
|
|
container_name: memento-web
|
|
env_file:
|
|
- .env.docker
|
|
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}
|
|
- NODE_ENV=production
|
|
- NEXT_TELEMETRY_DISABLED=1
|
|
volumes:
|
|
- uploads-data:/app/public/uploads
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
restart: unless-stopped
|
|
healthcheck:
|
|
test: ["CMD", "wget", "--spider", "-q", "http://localhost:3000"]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 3
|
|
start_period: 40s
|
|
networks:
|
|
- memento-network
|
|
deploy:
|
|
resources:
|
|
limits:
|
|
cpus: '2'
|
|
memory: 2G
|
|
reservations:
|
|
cpus: '0.5'
|
|
memory: 512M
|
|
|
|
# ============================================
|
|
# mcp-server - MCP Protocol Server
|
|
# ============================================
|
|
mcp-server:
|
|
build:
|
|
context: ./mcp-server
|
|
dockerfile: Dockerfile
|
|
container_name: memento-mcp
|
|
env_file:
|
|
- .env.docker
|
|
ports:
|
|
# SSE mode exposes port 3001, stdio mode doesn't need ports
|
|
- "3001:3001"
|
|
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}
|
|
- NODE_ENV=production
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
restart: unless-stopped
|
|
networks:
|
|
- memento-network
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "wget --spider -q http://localhost:3001/ || node -e \"console.log('healthy')\""]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 3
|
|
start_period: 10s
|
|
|
|
# ============================================
|
|
# Ollama - Local LLM Provider (Optional)
|
|
# ============================================
|
|
ollama:
|
|
image: ollama/ollama:latest
|
|
container_name: memento-ollama
|
|
ports:
|
|
- "11434:11434"
|
|
volumes:
|
|
- ollama-data:/root/.ollama
|
|
restart: unless-stopped
|
|
networks:
|
|
- memento-network
|
|
deploy:
|
|
resources:
|
|
limits:
|
|
cpus: '4'
|
|
memory: 8G
|
|
reservations:
|
|
cpus: '2'
|
|
memory: 4G
|
|
# Ollama is optional - only enable if you set AI_PROVIDER_TAGS=ollama
|
|
profiles:
|
|
- ollama
|
|
|
|
# ============================================
|
|
# Volumes - Data Persistence
|
|
# ============================================
|
|
volumes:
|
|
postgres-data:
|
|
driver: local
|
|
uploads-data:
|
|
driver: local
|
|
ollama-data:
|
|
driver: local
|
|
|
|
# ============================================
|
|
# Networks - Service Communication
|
|
# ============================================
|
|
networks:
|
|
memento-network:
|
|
driver: bridge
|