generated from personal-projects/leo-claude-mktplace
docs: Create CLAUDE.md and update deployment documentation (#27)
- Create CLAUDE.md with comprehensive project guidance for Claude Code - Update README.md with correct architecture (direct import, not subprocess) - Update project structure to reflect tests/ at repo root and docker/ directory - Update default port from 8000 to 8080 - Update repository links to Gitea - Update DEPLOYMENT.md with two-service Docker architecture (app + Caddy) - Fix Claude Desktop config example to use /mcp endpoint Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
# Deployment Guide
|
||||
|
||||
This guide covers production deployment of the Gitea HTTP MCP Wrapper in various environments.
|
||||
This guide covers production deployment of Gitea MCP Remote in various environments.
|
||||
|
||||
## Table of Contents
|
||||
|
||||
@@ -36,15 +36,15 @@ This guide covers production deployment of the Gitea HTTP MCP Wrapper in various
|
||||
1. **Clone the repository:**
|
||||
|
||||
```bash
|
||||
git clone https://github.com/lmiranda/gitea-mcp-remote.git
|
||||
git clone https://gitea.hotserv.cloud/personal-projects/gitea-mcp-remote.git
|
||||
cd gitea-mcp-remote
|
||||
```
|
||||
|
||||
2. **Create configuration:**
|
||||
|
||||
```bash
|
||||
cp .env.docker.example .env
|
||||
nano .env # Edit with your values
|
||||
cp docker/.env.example docker/.env
|
||||
nano docker/.env # Edit with your values
|
||||
```
|
||||
|
||||
Required configuration:
|
||||
@@ -52,49 +52,49 @@ Required configuration:
|
||||
GITEA_URL=https://gitea.example.com
|
||||
GITEA_TOKEN=your_gitea_api_token
|
||||
GITEA_OWNER=your_username_or_org
|
||||
GITEA_REPO=your_default_repo
|
||||
GITEA_REPO=your_default_repo # Optional
|
||||
AUTH_TOKEN=your_bearer_token # Recommended
|
||||
```
|
||||
|
||||
3. **Start the service:**
|
||||
3. **Start the services (app + Caddy):**
|
||||
|
||||
```bash
|
||||
docker-compose up -d
|
||||
docker-compose -f docker/docker-compose.yml up -d
|
||||
```
|
||||
|
||||
4. **Verify deployment:**
|
||||
|
||||
```bash
|
||||
curl http://localhost:8000/health
|
||||
curl http://localhost/health # Via Caddy
|
||||
curl http://localhost:8080/health # Direct to app
|
||||
```
|
||||
|
||||
### Production Configuration
|
||||
|
||||
For production, use a more robust `docker-compose.yml`:
|
||||
The default `docker/docker-compose.yml` includes both app and Caddy reverse proxy services. For customization:
|
||||
|
||||
```yaml
|
||||
version: '3.8'
|
||||
|
||||
services:
|
||||
gitea-mcp-wrapper:
|
||||
# Python MCP Server
|
||||
app:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
image: gitea-mcp-wrapper:latest
|
||||
container_name: gitea-mcp-wrapper
|
||||
context: ..
|
||||
dockerfile: docker/Dockerfile
|
||||
image: gitea-mcp-remote:latest
|
||||
container_name: gitea-mcp-remote-app
|
||||
restart: always
|
||||
ports:
|
||||
- "127.0.0.1:8000:8000" # Bind to localhost only
|
||||
expose:
|
||||
- "8080"
|
||||
environment:
|
||||
- GITEA_URL=${GITEA_URL}
|
||||
- GITEA_TOKEN=${GITEA_TOKEN}
|
||||
- GITEA_OWNER=${GITEA_OWNER}
|
||||
- GITEA_REPO=${GITEA_REPO}
|
||||
- GITEA_REPO=${GITEA_REPO:-}
|
||||
- HTTP_HOST=0.0.0.0
|
||||
- HTTP_PORT=8000
|
||||
- AUTH_TOKEN=${AUTH_TOKEN}
|
||||
- HTTP_PORT=8080
|
||||
- AUTH_TOKEN=${AUTH_TOKEN:-}
|
||||
healthcheck:
|
||||
test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:8000/health').read()"]
|
||||
test: ["CMD", "curl", "-f", "http://localhost:8080/health"]
|
||||
interval: 30s
|
||||
timeout: 3s
|
||||
retries: 3
|
||||
@@ -107,9 +107,31 @@ services:
|
||||
networks:
|
||||
- gitea-mcp-network
|
||||
|
||||
# Caddy Reverse Proxy (HTTPS termination)
|
||||
caddy:
|
||||
image: caddy:2-alpine
|
||||
container_name: gitea-mcp-remote-caddy
|
||||
restart: always
|
||||
ports:
|
||||
- "80:80"
|
||||
- "443:443"
|
||||
volumes:
|
||||
- ./Caddyfile:/etc/caddy/Caddyfile:ro
|
||||
- caddy_data:/data
|
||||
- caddy_config:/config
|
||||
depends_on:
|
||||
app:
|
||||
condition: service_healthy
|
||||
networks:
|
||||
- gitea-mcp-network
|
||||
|
||||
networks:
|
||||
gitea-mcp-network:
|
||||
driver: bridge
|
||||
|
||||
volumes:
|
||||
caddy_data:
|
||||
caddy_config:
|
||||
```
|
||||
|
||||
### Docker Build Options
|
||||
@@ -117,20 +139,20 @@ networks:
|
||||
**Build the image:**
|
||||
|
||||
```bash
|
||||
docker build -t gitea-mcp-wrapper:latest .
|
||||
docker build -f docker/Dockerfile -t gitea-mcp-remote:latest .
|
||||
```
|
||||
|
||||
**Build with specific Python version:**
|
||||
|
||||
```bash
|
||||
docker build --build-arg PYTHON_VERSION=3.11 -t gitea-mcp-wrapper:latest .
|
||||
docker build -f docker/Dockerfile --build-arg PYTHON_VERSION=3.11 -t gitea-mcp-remote:latest .
|
||||
```
|
||||
|
||||
**Tag for registry:**
|
||||
|
||||
```bash
|
||||
docker tag gitea-mcp-wrapper:latest registry.example.com/gitea-mcp-wrapper:latest
|
||||
docker push registry.example.com/gitea-mcp-wrapper:latest
|
||||
docker tag gitea-mcp-remote:latest registry.example.com/gitea-mcp-remote:latest
|
||||
docker push registry.example.com/gitea-mcp-remote:latest
|
||||
```
|
||||
|
||||
## Security Best Practices
|
||||
@@ -218,7 +240,7 @@ Docker automatically monitors the health check and can restart if unhealthy:
|
||||
|
||||
```yaml
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-f", "http://localhost:8000/health"]
|
||||
test: ["CMD", "curl", "-f", "http://localhost:8080/health"]
|
||||
interval: 30s
|
||||
timeout: 3s
|
||||
retries: 3
|
||||
|
||||
Reference in New Issue
Block a user