-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathDockerfile
More file actions
36 lines (24 loc) · 951 Bytes
/
Dockerfile
File metadata and controls
36 lines (24 loc) · 951 Bytes
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
FROM node:24-alpine AS build
WORKDIR /app
# Install all dependencies needed to compile the TypeScript source.
COPY package*.json ./
RUN npm ci
COPY tsconfig.json ./
COPY src ./src
RUN npm run build
RUN npm prune --omit=dev && npm cache clean --force
FROM node:24-alpine AS runtime
WORKDIR /app
# Create a non-root user for the final runtime image.
RUN adduser -D mcp_user
ENV NODE_ENV=production
LABEL org.opencontainers.image.source="https://github.com/gitmotion/ntfy-me-mcp"
COPY --from=build /app/package*.json ./
COPY --from=build --chown=mcp_user:mcp_user /app/node_modules ./node_modules
COPY --from=build --chown=mcp_user:mcp_user /app/build ./build
USER mcp_user
CMD ["node", "build/index.js"]
# The following environment variables can be passed when running the container:
# - NTFY_TOPIC: Your ntfy topic name
# - NTFY_URL: Your ntfy server URL (default: https://ntfy.sh)
# - NTFY_TOKEN: Authentication token for protected topics