feat: rename keep-notes to memento-note, migrate to PostgreSQL, fix MCP bugs
- Rename directory keep-notes -> memento-note with all code references - Prisma: SQLite -> PostgreSQL (both app and MCP server schemas) - Sync MCP schema with main app (add missing fields, relations, indexes) - Delete 17 SQLite migrations (clean slate for PostgreSQL) - Remove SQLite dependencies (@libsql/client, better-sqlite3, etc.) - Fix MCP server: hardcoded Windows DB paths -> DATABASE_URL env var - Fix MCP server: .dockerignore excluded index-sse.js (SSE mode broken) - MCP Dockerfile: node:20 -> node:22 - Docker Compose: add postgres service, remove SQLite volume - Generate favicon.ico, icon-192.png, icon-512.png, apple-icon.png - Update layout.tsx icons and manifest.json for PNG icons - Update all .env files for PostgreSQL - Rewrite README.md with updated sections - Remove mcp-server/node_modules and prisma/client-generated from git tracking Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,10 +1,34 @@
|
||||
services:
|
||||
# ============================================
|
||||
# keep-notes - Next.js Web Application
|
||||
# PostgreSQL - Database
|
||||
# ============================================
|
||||
keep-notes:
|
||||
postgres:
|
||||
image: postgres:16-alpine
|
||||
container_name: memento-postgres
|
||||
ports:
|
||||
- "${POSTGRES_PORT:-5432}:5432"
|
||||
environment:
|
||||
- POSTGRES_DB=${POSTGRES_DB:-memento}
|
||||
- POSTGRES_USER=${POSTGRES_USER:-memento}
|
||||
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD:-memento}
|
||||
volumes:
|
||||
- postgres-data:/var/lib/postgresql/data
|
||||
restart: unless-stopped
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-memento}"]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
start_period: 10s
|
||||
networks:
|
||||
- memento-network
|
||||
|
||||
# ============================================
|
||||
# memento-note - Next.js Web Application
|
||||
# ============================================
|
||||
memento-note:
|
||||
build:
|
||||
context: ./keep-notes
|
||||
context: ./memento-note
|
||||
dockerfile: Dockerfile
|
||||
container_name: memento-web
|
||||
env_file:
|
||||
@@ -12,7 +36,7 @@ services:
|
||||
ports:
|
||||
- "3000:3000"
|
||||
environment:
|
||||
- DATABASE_URL=file:/app/prisma/dev.db
|
||||
- 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
|
||||
@@ -34,8 +58,10 @@ services:
|
||||
- AI_MODEL_TAGS=${AI_MODEL_TAGS}
|
||||
- AI_MODEL_EMBEDDING=${AI_MODEL_EMBEDDING}
|
||||
volumes:
|
||||
- db-data:/app/prisma
|
||||
- uploads-data:/app/public/uploads
|
||||
depends_on:
|
||||
postgres:
|
||||
condition: service_healthy
|
||||
restart: unless-stopped
|
||||
healthcheck:
|
||||
test: ["CMD", "wget", "--spider", "-q", "http://localhost:3000"]
|
||||
@@ -71,14 +97,10 @@ services:
|
||||
# Mode: 'stdio' (default, for Claude Desktop) or 'sse' (for HTTP/N8N)
|
||||
- MCP_MODE=${MCP_MODE:-stdio}
|
||||
- PORT=${MCP_PORT:-3001}
|
||||
# Database path - must match the volume mount
|
||||
- DATABASE_URL=file:/app/db/dev.db
|
||||
- DATABASE_URL=postgresql://${POSTGRES_USER:-memento}:${POSTGRES_PASSWORD:-memento}@postgres:5432/${POSTGRES_DB:-memento}
|
||||
- NODE_ENV=production
|
||||
volumes:
|
||||
# Shared database with keep-notes
|
||||
- db-data:/app/db
|
||||
depends_on:
|
||||
keep-notes:
|
||||
postgres:
|
||||
condition: service_healthy
|
||||
restart: unless-stopped
|
||||
networks:
|
||||
@@ -119,7 +141,7 @@ services:
|
||||
# Volumes - Data Persistence
|
||||
# ============================================
|
||||
volumes:
|
||||
db-data:
|
||||
postgres-data:
|
||||
driver: local
|
||||
uploads-data:
|
||||
driver: local
|
||||
|
||||
Reference in New Issue
Block a user