fix: resolve Docker build failures

- Add openai and zod to Docker build stage for TypeScript compilation
- Remove openai and zod from runtime package.json as they're not needed at runtime
- These packages are only used by fetch-templates script, not the MCP server

The metadata generation code is dynamically imported only when needed,
keeping the runtime Docker image lean.

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
czlonkowski
2025-09-15 01:22:18 +02:00
parent 0c4a2199f5
commit a7846c4ee9
2 changed files with 4 additions and 4 deletions

View File

@@ -9,11 +9,13 @@ WORKDIR /app
COPY tsconfig*.json ./
# Create minimal package.json and install ONLY build dependencies
# Note: openai and zod are needed for TypeScript compilation of template metadata modules
RUN --mount=type=cache,target=/root/.npm \
echo '{}' > package.json && \
npm install --no-save typescript@^5.8.3 @types/node@^22.15.30 @types/express@^5.0.3 \
@modelcontextprotocol/sdk@^1.12.1 dotenv@^16.5.0 express@^5.1.0 axios@^1.10.0 \
n8n-workflow@^1.96.0 uuid@^11.0.5 @types/uuid@^10.0.0
n8n-workflow@^1.96.0 uuid@^11.0.5 @types/uuid@^10.0.0 \
openai@^4.77.0 zod@^3.24.1
# Copy source and build
COPY src ./src

View File

@@ -9,9 +9,7 @@
"dotenv": "^16.5.0",
"sql.js": "^1.13.0",
"uuid": "^10.0.0",
"axios": "^1.7.7",
"openai": "^4.77.0",
"zod": "^3.24.1"
"axios": "^1.7.7"
},
"engines": {
"node": ">=16.0.0"