fix(docker): Provide --host 0.0.0.0 in default docker image
This commit is contained in:
+1
-1
@@ -6,4 +6,4 @@ COPY . .
|
|||||||
|
|
||||||
RUN uv sync --locked --no-dev
|
RUN uv sync --locked --no-dev
|
||||||
|
|
||||||
ENTRYPOINT ["/app/.venv/bin/python", "-m", "nextcloud_mcp_server.app"]
|
ENTRYPOINT ["/app/.venv/bin/python", "-m", "nextcloud_mcp_server.app", "--host", "0.0.0.0"]
|
||||||
|
|||||||
@@ -131,14 +131,14 @@ uv run python -m nextcloud_mcp_server.app --transport sse
|
|||||||
```
|
```
|
||||||
|
|
||||||
#### Docker Usage with Transports
|
#### Docker Usage with Transports
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
# Using SSE transport (default - deprecated)
|
||||||
|
docker run -p 127.0.0.1:8000:8000 --env-file .env --rm ghcr.io/cbcoutinho/nextcloud-mcp-server:latest
|
||||||
|
|
||||||
# Using streamable-http transport (recommended)
|
# Using streamable-http transport (recommended)
|
||||||
docker run -p 127.0.0.1:8000:8000 --env-file .env --rm ghcr.io/cbcoutinho/nextcloud-mcp-server:latest \
|
docker run -p 127.0.0.1:8000:8000 --env-file .env --rm ghcr.io/cbcoutinho/nextcloud-mcp-server:latest \
|
||||||
--host 0.0.0.0 --transport streamable-http
|
--transport streamable-http
|
||||||
|
|
||||||
# Using SSE transport (deprecated)
|
|
||||||
docker run -p 127.0.0.1:8000:8000 --env-file .env --rm ghcr.io/cbcoutinho/nextcloud-mcp-server:latest \
|
|
||||||
--host 0.0.0.0 --transport sse
|
|
||||||
```
|
```
|
||||||
|
|
||||||
**Note:** When using MCP clients, ensure your client supports the transport type you've configured on the server. Most modern MCP clients support streamable-http.
|
**Note:** When using MCP clients, ensure your client supports the transport type you've configured on the server. Most modern MCP clients support streamable-http.
|
||||||
@@ -154,8 +154,8 @@ Ensure your environment variables are loaded, then run the server. You have seve
|
|||||||
# Load environment variables from your .env file
|
# Load environment variables from your .env file
|
||||||
export $(grep -v '^#' .env | xargs)
|
export $(grep -v '^#' .env | xargs)
|
||||||
|
|
||||||
# Or run the app module directly with custom options
|
# Run the app module directly with custom options
|
||||||
uv run python -m nextcloud_mcp_server.app --host 0.0.0.0 --port 8080 --log-level info --reload
|
uv run python -m nextcloud_mcp_server.app --host 0.0.0.0 --port 8080 --log-level info
|
||||||
|
|
||||||
# Enable only specific Nextcloud app APIs
|
# Enable only specific Nextcloud app APIs
|
||||||
uv run python -m nextcloud_mcp_server.app --enable-app notes --enable-app calendar
|
uv run python -m nextcloud_mcp_server.app --enable-app notes --enable-app calendar
|
||||||
@@ -217,16 +217,15 @@ Mount your environment file when running the container:
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Run with all apps enabled (default)
|
# Run with all apps enabled (default)
|
||||||
docker run -p 127.0.0.1:8000:8000 --env-file .env --rm ghcr.io/cbcoutinho/nextcloud-mcp-server:latest \
|
docker run -p 127.0.0.1:8000:8000 --env-file .env --rm ghcr.io/cbcoutinho/nextcloud-mcp-server:latest
|
||||||
--host 0.0.0.0
|
|
||||||
|
|
||||||
# Run with only specific apps enabled
|
# Run with only specific apps enabled
|
||||||
docker run -p 127.0.0.1:8000:8000 --env-file .env --rm ghcr.io/cbcoutinho/nextcloud-mcp-server:latest \
|
docker run -p 127.0.0.1:8000:8000 --env-file .env --rm ghcr.io/cbcoutinho/nextcloud-mcp-server:latest \
|
||||||
--host 0.0.0.0 --enable-app notes --enable-app calendar
|
--enable-app notes --enable-app calendar
|
||||||
|
|
||||||
# Run with only WebDAV
|
# Run with only WebDAV
|
||||||
docker run -p 127.0.0.1:8000:8000 --env-file .env --rm ghcr.io/cbcoutinho/nextcloud-mcp-server:latest \
|
docker run -p 127.0.0.1:8000:8000 --env-file .env --rm ghcr.io/cbcoutinho/nextcloud-mcp-server:latest \
|
||||||
--host 0.0.0.0 --enable-app webdav
|
--enable-app webdav
|
||||||
```
|
```
|
||||||
|
|
||||||
This will start the server and expose it on port 8000 of your local machine.
|
This will start the server and expose it on port 8000 of your local machine.
|
||||||
|
|||||||
+1
-1
@@ -46,7 +46,7 @@ services:
|
|||||||
|
|
||||||
mcp:
|
mcp:
|
||||||
build: .
|
build: .
|
||||||
command: ["--host", "0.0.0.0", "--transport", "streamable-http"]
|
command: ["--transport", "streamable-http"]
|
||||||
ports:
|
ports:
|
||||||
- 127.0.0.1:8000:8000
|
- 127.0.0.1:8000:8000
|
||||||
environment:
|
environment:
|
||||||
|
|||||||
Reference in New Issue
Block a user