Make compose container and network names configurable

This commit is contained in:
latinogino
2026-02-04 16:49:29 +01:00
parent 8917de987d
commit c75762be8a
3 changed files with 10 additions and 2 deletions

View File

@@ -10,3 +10,7 @@ MCP_TRANSPORT=http
MCP_HTTP_HOST=0.0.0.0
MCP_HTTP_PORT=8080
MCP_HOST_PORT=18004
# Docker Compose naming
MCP_CONTAINER_NAME=dolibarr-mcp-server
MCP_NETWORK_NAME=dolibarr-mcp-net

View File

@@ -100,6 +100,8 @@ overwritten by `git pull` on your server.
| `MCP_HTTP_HOST` | Host/interface to bind when using HTTP transport (default `0.0.0.0`). |
| `MCP_HTTP_PORT` | Port to bind when using HTTP transport (default `8080`). |
| `MCP_HOST_PORT` | Optional host port to publish in Docker Compose (default `18004`). |
| `MCP_CONTAINER_NAME` | Optional Docker Compose container name (default `dolibarr-mcp-server`). |
| `MCP_NETWORK_NAME` | Optional Docker Compose network name (default `dolibarr-mcp-net`). |
Example `.env`:
@@ -107,6 +109,8 @@ Example `.env`:
DOLIBARR_URL=https://your-dolibarr.example.com/api/index.php
DOLIBARR_API_KEY=YOUR_API_KEY
LOG_LEVEL=INFO
MCP_CONTAINER_NAME=dolibarr-mcp-server
MCP_NETWORK_NAME=dolibarr-mcp-net
```
### Claude Desktop configuration

View File

@@ -4,7 +4,7 @@ services:
context: .
dockerfile: docker/Dockerfile
image: dolibarr-mcp:latest
container_name: dolibarr-mcp-server
container_name: ${MCP_CONTAINER_NAME:-dolibarr-mcp-server}
restart: unless-stopped
environment:
# Dolibarr API Configuration
@@ -74,7 +74,7 @@ services:
networks:
dolibarr-mcp-network:
driver: bridge
name: dolibarr-mcp-net
name: ${MCP_NETWORK_NAME:-dolibarr-mcp-net}
# To run the main server:
# docker compose up -d