parametrize docker image
This commit is contained in:
3 files changed
+7
-4
No files matched your search
+1
-1
@@ -26,4 +26,4 @@ RUN npm ci --ignore-scripts --omit-dev
|
|||||||
|
|
||||||
USER node
|
USER node
|
||||||
|
|
||||||
CMD ["node", "dist/index.js", "--host", "0.0.0.0", "--port", "8080", "--transport", "http"]
|
CMD ["node", "dist/index.js"]
|
||||||
@@ -9,6 +9,9 @@ services:
|
|||||||
delay: 5s
|
delay: 5s
|
||||||
environment:
|
environment:
|
||||||
- BRAVE_API_KEY
|
- BRAVE_API_KEY
|
||||||
|
- BRAVE_MCP_TRANSPORT=http
|
||||||
|
- BRAVE_MCP_PORT=8080
|
||||||
|
- BRAVE_MCP_HOST=0.0.0.0
|
||||||
init: true
|
init: true
|
||||||
ports:
|
ports:
|
||||||
- 8080:8080
|
- 8080:8080
|
||||||
|
|||||||
+3
-3
@@ -19,9 +19,9 @@ if (!BRAVE_API_KEY) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const program = new Command()
|
const program = new Command()
|
||||||
.option("--transport <stdio|http>", "transport type", "http")
|
.option("--transport <stdio|http>", "transport type", process.env.BRAVE_MCP_TRANSPORT ?? "stdio")
|
||||||
.option("--port <number>", "desired port for HTTP transport", "3000")
|
.option("--port <number>", "desired port for HTTP transport", process.env.BRAVE_MCP_PORT ?? "3000")
|
||||||
.option("--host <string>", "host address to bind to for HTTP transport", "127.0.0.1")
|
.option("--host <string>", "host address to bind to for HTTP transport", process.env.BRAVE_MCP_HOST ?? "0.0.0.0")
|
||||||
.allowUnknownOption()
|
.allowUnknownOption()
|
||||||
.parse(process.argv);
|
.parse(process.argv);
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user