File tree Expand file tree Collapse file tree 2 files changed +37
-2
lines changed
Expand file tree Collapse file tree 2 files changed +37
-2
lines changed Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ WORKDIR /app
77COPY package*.json ./
88
99# Install dependencies
10- RUN npm ci
10+ RUN npm ci --ignore-scripts
1111
1212# Copy source code
1313COPY . .
@@ -24,7 +24,7 @@ WORKDIR /app
2424COPY package*.json ./
2525
2626# Install production dependencies only
27- RUN npm ci --omit=dev
27+ RUN npm ci --omit=dev --ignore-scripts
2828
2929# Copy built files from builder
3030COPY --from=builder /app/dist ./dist
Original file line number Diff line number Diff line change 1+ startCommand :
2+ type : stdio
3+ # Define the schema for user configuration.
4+ configSchema :
5+ type : object
6+ properties :
7+ OPENAI_API_KEY :
8+ type : string
9+ description : Your OpenAI API Key for accessing embedding models.
10+ # Consider adding format: password if Smithery supports masking secrets
11+ required :
12+ - OPENAI_API_KEY
13+ additionalProperties : false # Disallow extra properties
14+ # This function receives the user's config and returns the start command details.
15+ commandFunction : |
16+ (config) => {
17+ // Ensure the config object and the key exist before accessing.
18+ const apiKey = config?.OPENAI_API_KEY;
19+ if (!apiKey) {
20+ // Smithery should prevent this based on 'required', but good practice to check.
21+ throw new Error('OPENAI_API_KEY is missing in the configuration.');
22+ }
23+ return {
24+ command: 'node',
25+ args: ['dist/server.js'],
26+ // Pass the API key from the config to the server's environment.
27+ env: {
28+ OPENAI_API_KEY: apiKey
29+ }
30+ };
31+ }
32+ # Build configuration remains the same.
33+ build :
34+ dockerfile : Dockerfile
35+ dockerBuildPath : .
You can’t perform that action at this time.
0 commit comments