File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change 1
1
FROM node:22-alpine
2
+
2
3
ARG VERSION=latest
4
+
5
+ # Create mcp user and group
3
6
RUN addgroup -S mcp && adduser -S mcp -G mcp
7
+
8
+ # Install the MongoDB MCP server globally
4
9
RUN npm install -g mongodb-mcp-server@${VERSION}
10
+
11
+ # Install wget for health checks
12
+ RUN apk add --no-cache wget
13
+
14
+ # Switch to mcp user
5
15
USER mcp
6
16
WORKDIR /home/mcp
17
+
18
+ # Expose port for Railway health checks
19
+ EXPOSE 3000
20
+
21
+ # Add health check
22
+ HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \
23
+ CMD wget --no-verbose --tries=1 --spider http://localhost:3000/health || exit 1
24
+
25
+ # Set the entrypoint
7
26
ENTRYPOINT ["mongodb-mcp-server" ]
27
+
28
+ # Labels
8
29
LABEL maintainer=
"MongoDB Inc <[email protected] >"
9
30
LABEL description="MongoDB MCP Server"
10
31
LABEL version=${VERSION}
You can’t perform that action at this time.
0 commit comments