diff --git a/.env.template b/.env.template index 4efaa2ff8..23505fd5b 100644 --- a/.env.template +++ b/.env.template @@ -5,7 +5,7 @@ OPENAI_API_KEY=sk-xxxx DEEPSEEK_API_KEY= # Access password, separated by comma. (optional) -CODE=your-password +CODE= # You can start service behind a proxy. (optional) PROXY_URL=http://localhost:7890 @@ -15,6 +15,9 @@ PROXY_URL=http://localhost:7890 # Set to "true" to enable MCP functionality ENABLE_MCP= +# Humanitec token for authenticating humctl in the container (required if ENABLE_MCP is true) +HUMANITEC_TOKEN= + # (optional) # Default: Empty # Google Gemini Pro API key, set if you want to use Google Gemini Pro API. diff --git a/Dockerfile b/Dockerfile index d3e4193ee..0941643fe 100644 --- a/Dockerfile +++ b/Dockerfile @@ -40,6 +40,8 @@ COPY --from=builder /app/public ./public COPY --from=builder /app/.next/standalone ./ COPY --from=builder /app/.next/static ./.next/static COPY --from=builder /app/.next/server ./.next/server +COPY --from=builder /app/bin /app/bin +RUN chmod +x /app/bin/* RUN mkdir -p /app/app/mcp && chmod 777 /app/app/mcp COPY --from=builder /app/app/mcp/mcp_config.default.json /app/app/mcp/mcp_config.json diff --git a/app/mcp/mcp_config.default.json b/app/mcp/mcp_config.default.json new file mode 100644 index 000000000..c17fb0691 --- /dev/null +++ b/app/mcp/mcp_config.default.json @@ -0,0 +1,9 @@ +{ + "mcpServers": { + "canyon": { + "command": "/app/bin/canyon", + "args": ["mcp"], + "env": {} + } + } +} diff --git a/docker-compose.yml b/docker-compose.yml index 935b126a3..b935e2c6f 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,11 +1,13 @@ version: "3.9" services: chatgpt-next-web: - profiles: [ "no-proxy" ] + profiles: ["no-proxy"] container_name: chatgpt-next-web - image: yidadaa/chatgpt-next-web + build: . ports: - 3000:3000 + volumes: + - ~/.humctl:/root/.humctl environment: - OPENAI_API_KEY=$OPENAI_API_KEY - GOOGLE_API_KEY=$GOOGLE_API_KEY @@ -19,11 +21,13 @@ services: - OPENAI_SB=$OPENAI_SB chatgpt-next-web-proxy: - profiles: [ "proxy" ] + profiles: ["proxy"] container_name: chatgpt-next-web-proxy - image: yidadaa/chatgpt-next-web + build: . ports: - 3000:3000 + volumes: + - ~/.humctl:/root/.humctl environment: - OPENAI_API_KEY=$OPENAI_API_KEY - GOOGLE_API_KEY=$GOOGLE_API_KEY