chore: snapshot before performance optimization
This commit is contained in:
@@ -1,4 +1,27 @@
|
||||
services:
|
||||
# ============================================
|
||||
# PostgreSQL - Shared Database
|
||||
# ============================================
|
||||
postgres:
|
||||
image: postgres:16-alpine
|
||||
container_name: memento-postgres
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
POSTGRES_USER: keepnotes
|
||||
POSTGRES_PASSWORD: keepnotes
|
||||
POSTGRES_DB: keepnotes
|
||||
volumes:
|
||||
- postgres-data:/var/lib/postgresql/data
|
||||
ports:
|
||||
- "5432:5432"
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U keepnotes"]
|
||||
interval: 5s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
networks:
|
||||
- memento-network
|
||||
|
||||
# ============================================
|
||||
# keep-notes - Next.js Web Application
|
||||
# ============================================
|
||||
@@ -12,7 +35,7 @@ services:
|
||||
ports:
|
||||
- "3000:3000"
|
||||
environment:
|
||||
- DATABASE_URL=file:/app/prisma/dev.db
|
||||
- DATABASE_URL=postgresql://keepnotes:keepnotes@postgres:5432/keepnotes
|
||||
- NEXTAUTH_SECRET=${NEXTAUTH_SECRET:-changethisinproduction}
|
||||
- NEXTAUTH_URL=${NEXTAUTH_URL:-http://localhost:3000}
|
||||
- NODE_ENV=production
|
||||
@@ -34,8 +57,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 +96,11 @@ 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 - connect to shared PostgreSQL
|
||||
- DATABASE_URL=postgresql://keepnotes:keepnotes@postgres:5432/keepnotes
|
||||
- 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