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:
Sepehr Ramezani
2026-04-20 20:58:04 +02:00
parent e2ddfa53d4
commit aa6a214f37
3548 changed files with 440 additions and 516800 deletions

View File

@@ -0,0 +1,112 @@
services:
# ============================================
# PostgreSQL - Database
# ============================================
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: .
dockerfile: Dockerfile
image: memento-note:latest
container_name: memento-note
restart: unless-stopped
ports:
- "3000:3000"
environment:
# Database
- DATABASE_URL=postgresql://${POSTGRES_USER:-memento}:${POSTGRES_PASSWORD:-memento}@postgres:5432/${POSTGRES_DB:-memento}
- NODE_ENV=production
# Application (IMPORTANT: Change these!)
- NEXTAUTH_URL=${NEXTAUTH_URL:-http://localhost:3000}
- NEXTAUTH_SECRET=${NEXTAUTH_SECRET:-change-this-to-a-random-secret-string}
# Disable Next.js telemetry
- NEXT_TELEMETRY_DISABLED=1
# AI Provider (Optional - for OpenAI)
# - OPENAI_API_KEY=your-openai-api-key-here
# AI Provider (Optional - for Ollama)
# - OLLAMA_BASE_URL=http://ollama:11434
# - OLLAMA_MODEL=granite4:latest
volumes:
# Persist uploaded images and files
- uploads-data:/app/public/uploads
depends_on:
postgres:
condition: service_healthy
networks:
- memento-network
# Optional: Resource limits for Proxmox VM
deploy:
resources:
limits:
cpus: '2'
memory: 2G
reservations:
cpus: '0.5'
memory: 512M
# Health check for automatic restart
healthcheck:
test: ["CMD", "wget", "--spider", "-q", "http://localhost:3000"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
# Optional: Ollama for local AI models
# Uncomment this section if you want to use local AI models
# ollama:
# image: ollama/ollama:latest
# container_name: memento-ollama
# restart: unless-stopped
# ports:
# - "11434:11434"
# volumes:
# - ollama-data:/root/.ollama
# networks:
# - memento-network
# deploy:
# resources:
# limits:
# cpus: '4'
# memory: 8G
# reservations:
# cpus: '2'
# memory: 4G
networks:
memento-network:
driver: bridge
volumes:
postgres-data:
driver: local
uploads-data:
driver: local
# ollama-data:
# driver: local