Skip to content

Commit 70bfb66

Browse files
authored
Merge pull request #2 from smithery-ai/smithery/config-p1iz
Deployment: Dockerfile and Smithery config
2 parents 4987ec4 + 157e0be commit 70bfb66

File tree

2 files changed

+55
-0
lines changed

2 files changed

+55
-0
lines changed

Dockerfile

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# Generated by https://smithery.ai. See: https://smithery.ai/docs/config#dockerfile
2+
# Use Node.js 22.12-alpine as the base image
3+
FROM node:22.12-alpine AS builder
4+
5+
# Create and change to the app directory
6+
WORKDIR /app
7+
8+
# Copy package.json and package-lock.json
9+
COPY package.json package-lock.json ./
10+
11+
# Install dependencies
12+
RUN --mount=type=cache,target=/root/.npm npm ci
13+
14+
# Copy the source code
15+
COPY src ./src
16+
COPY tsconfig.json ./
17+
18+
# Build the TypeScript source
19+
RUN npm run build
20+
21+
# Create a new release image
22+
FROM node:22-alpine AS release
23+
24+
# Set the working directory
25+
WORKDIR /app
26+
27+
# Copy the built application and the necessary files
28+
COPY --from=builder /app/dist /app/dist
29+
COPY --from=builder /app/package.json /app/package-lock.json ./
30+
31+
# Set the environment variable for production
32+
ENV NODE_ENV=production
33+
34+
# Install only production dependencies
35+
RUN npm ci --ignore-scripts --omit=dev
36+
37+
# Set the command to run the server
38+
ENTRYPOINT ["node", "dist/index.js"]

smithery.yaml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Smithery configuration file: https://smithery.ai/docs/config#smitheryyaml
2+
3+
startCommand:
4+
type: stdio
5+
configSchema:
6+
# JSON Schema defining the configuration options for the MCP.
7+
type: object
8+
required:
9+
- databasePath
10+
properties:
11+
databasePath:
12+
type: string
13+
description: The absolute path to the SQLite database file.
14+
commandFunction:
15+
# A function that produces the CLI command to start the MCP on stdio.
16+
|-
17+
(config) => ({command:'node',args:['dist/index.js', config.databasePath]})

0 commit comments

Comments
 (0)