forked from andradehenrique/dokploy-mcp
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
43 lines (32 loc) · 1.14 KB
/
Dockerfile
File metadata and controls
43 lines (32 loc) · 1.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# ⚠️ WARNING: This project has been DISCONTINUED
# 📍 New official repository: https://github.com/Dokploy/mcp
# 🔄 Please migrate to the official repository
# ----- Build Stage -----
FROM node:lts-alpine AS builder
WORKDIR /app
# Copy package and configuration
COPY package.json tsconfig.json ./
# Copy source code
COPY src ./src
# Install dependencies and build
RUN npm install && npm run build
# ----- Production Stage -----
FROM node:lts-alpine
WORKDIR /app
# Copy built artifacts
COPY --from=builder /app/build ./build
# Copy package.json for production install
COPY package.json ./
# Install only production dependencies
RUN npm install --production --ignore-scripts
# Expose port for HTTP mode (optional, defaults to 3000)
EXPOSE 3000
# Add health check for HTTP mode
HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \
CMD if [ "$MCP_TRANSPORT" = "http" ] || [ "$MCP_TRANSPORT" = "sse" ]; then \
wget --no-verbose --tries=1 --spider http://localhost:${PORT:-3000}/health || exit 1; \
else \
exit 0; \
fi
# Default command supports both stdio and HTTP modes
CMD ["node", "build/index.js"]