fix: MCP server Docker deployment, healthchecks, and minor fixes
MCP server: - Fix Prisma imports from stale client-generated path to @prisma/client - Switch schema from SQLite to PostgreSQL for Docker compatibility - Add prisma generate step to Dockerfile with proper binaryTargets - Include index-sse.js in Docker build (was excluded by .dockerignore) - Install openssl and libc6-compat in Alpine image for Prisma runtime Docker: - Fix memento-note healthcheck (wget unavailable in bullseye-slim) Minor fixes: - scrape.service SSRF protection, middleware route coverage - canvas-board and note-input type fixes - next.config turbopack and devIndicators adjustments Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -6,6 +6,5 @@ node_modules
|
||||
.env.*
|
||||
*.log
|
||||
.DS_Store
|
||||
index-sse.js
|
||||
README-SSE.md
|
||||
N8N-CONFIG.md
|
||||
|
||||
@@ -4,20 +4,24 @@ FROM node:20-alpine
|
||||
# Install dependencies
|
||||
WORKDIR /app
|
||||
|
||||
# Install curl and wget for healthchecks
|
||||
RUN apk add --no-cache curl wget
|
||||
# Install curl, wget, and openssl for healthchecks and Prisma runtime
|
||||
RUN apk add --no-cache curl wget openssl libc6-compat
|
||||
|
||||
# Copy package files
|
||||
COPY package*.json ./
|
||||
|
||||
# Install dependencies
|
||||
RUN npm ci --only=production
|
||||
# Install all dependencies (including dev for prisma generate)
|
||||
RUN npm ci
|
||||
|
||||
# Copy application code
|
||||
COPY . .
|
||||
|
||||
# Copy Prisma schema and client
|
||||
# Copy Prisma schema and generate client
|
||||
COPY prisma ./prisma
|
||||
RUN npx prisma generate
|
||||
|
||||
# Prune devDependencies after generating Prisma client
|
||||
RUN npm prune --omit=dev
|
||||
|
||||
# Create non-root user
|
||||
RUN addgroup -g 1001 -S mcp && \
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* Vérifier les propriétés des notes
|
||||
*/
|
||||
|
||||
import { PrismaClient } from '../memento-note/prisma/client-generated/index.js';
|
||||
import { PrismaClient } from '@prisma/client';
|
||||
|
||||
const prisma = new PrismaClient({
|
||||
datasources: {
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* Supprimer toutes les notes créées
|
||||
*/
|
||||
|
||||
import { PrismaClient } from '../memento-note/prisma/client-generated/index.js';
|
||||
import { PrismaClient } from '@prisma/client';
|
||||
|
||||
const prisma = new PrismaClient({
|
||||
datasources: {
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* Utilise Prisma pour créer les notes
|
||||
*/
|
||||
|
||||
import { PrismaClient } from '../memento-note/prisma/client-generated/index.js';
|
||||
import { PrismaClient } from '@prisma/client';
|
||||
|
||||
const prisma = new PrismaClient({
|
||||
datasources: {
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* Importe le contenu intégral de chaque fichier .md
|
||||
*/
|
||||
|
||||
import { PrismaClient } from '../memento-note/prisma/client-generated/index.js';
|
||||
import { PrismaClient } from '@prisma/client';
|
||||
import { readFileSync } from 'fs';
|
||||
import { join, dirname } from 'path';
|
||||
import { fileURLToPath } from 'url';
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
|
||||
import { Server } from '@modelcontextprotocol/sdk/server/index.js';
|
||||
import { StreamableHTTPServerTransport } from '@modelcontextprotocol/sdk/server/streamableHttp.js';
|
||||
import { PrismaClient } from '../memento-note/prisma/client-generated/index.js';
|
||||
import { PrismaClient } from '@prisma/client';
|
||||
import { fileURLToPath } from 'url';
|
||||
import { dirname, join } from 'path';
|
||||
import { randomUUID } from 'crypto';
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
import { Server } from '@modelcontextprotocol/sdk/server/index.js';
|
||||
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
|
||||
import { PrismaClient } from '../memento-note/prisma/client-generated/index.js';
|
||||
import { PrismaClient } from '@prisma/client';
|
||||
import { fileURLToPath } from 'url';
|
||||
import { dirname, join } from 'path';
|
||||
import { registerTools } from './tools.js';
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
generator client {
|
||||
provider = "prisma-client-js"
|
||||
output = "../node_modules/.prisma/client"
|
||||
provider = "prisma-client-js"
|
||||
output = "../node_modules/.prisma/client"
|
||||
binaryTargets = ["linux-musl-openssl-3.0.x", "native"]
|
||||
}
|
||||
|
||||
datasource db {
|
||||
provider = "sqlite"
|
||||
url = "file:../../memento-note/prisma/dev.db"
|
||||
provider = "postgresql"
|
||||
url = env("DATABASE_URL")
|
||||
}
|
||||
|
||||
model Note {
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* node test/performance-test.js
|
||||
*/
|
||||
|
||||
import { PrismaClient } from '../memento-note/prisma/client-generated/index.js';
|
||||
import { PrismaClient } from '@prisma/client';
|
||||
|
||||
const prisma = new PrismaClient({
|
||||
datasources: {
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* Les notes sont créées avec isMarkdown: true
|
||||
*/
|
||||
|
||||
import { PrismaClient } from '../memento-note/prisma/client-generated/index.js';
|
||||
import { PrismaClient } from '@prisma/client';
|
||||
import { readFileSync } from 'fs';
|
||||
import { join } from 'path';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user