From c877963fe1bcc6ae207edf43fe9d9aac2d753f9b Mon Sep 17 00:00:00 2001 From: IAPP-BY Date: Tue, 3 Jun 2025 13:57:47 +0800 Subject: [PATCH] Fix: Smithery deployment issue --- Dockerfile | 2 +- smithery.yaml | 13 ++++++++++--- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index f3f1842..e82a554 100644 --- a/Dockerfile +++ b/Dockerfile @@ -20,4 +20,4 @@ RUN npm run build EXPOSE 8080 # Default command to run the MCP server with HTTP transport and Discord token -CMD ["node", "build/index.js", "--transport", "http", "--port", "8080"] \ No newline at end of file +CMD node build/index.js --transport http --port 8080 --config "$DISCORD_TOKEN" \ No newline at end of file diff --git a/smithery.yaml b/smithery.yaml index e1bc672..d874e8e 100644 --- a/smithery.yaml +++ b/smithery.yaml @@ -1,6 +1,16 @@ # Smithery configuration file: https://smithery.ai/docs/build/project-config/smithery.yaml version: 1 +runtime: "container" +build: + dockerfile: "Dockerfile" # Path to your Dockerfile + dockerBuildPath: "." # Docker build context + dockerBuildArgs: + DISCORD_TOKEN: ${discordToken} + dockerBuildEnv: + DISCORD_TOKEN: ${discordToken} + dockerRunEnv: + DISCORD_TOKEN: ${discordToken} startCommand: type: http configSchema: @@ -14,6 +24,3 @@ startCommand: description: "Discord bot token. Obtain this from the Discord Developer Portal." exampleConfig: discordToken: YOUR_DISCORD_BOT_TOKEN - -build: - dockerfile: Dockerfile \ No newline at end of file