Files
gitea-mcp-remote/docker/docker-compose.yml
lmiranda 88c16c840b feat: Add Docker infrastructure with Caddy and startup scripts (#25, #26)
Issue #25 - Docker multi-service infrastructure:
- Create docker/Dockerfile with multi-stage build, git support, port 8080
- Create docker/docker-compose.yml with app + Caddy services
- Create docker/Caddyfile for HTTPS termination and reverse proxy
- Create docker/.env.example with configuration template

Issue #26 - Startup scripts and tests:
- Create scripts/start.sh for production startup with env validation
- Create scripts/healthcheck.sh for Docker health checks
- Add health endpoint tests to test_mcp_endpoints.py
- Fix middleware order (HealthCheckBypass must wrap BearerAuth)
- Fix pyproject.toml testpaths to use 'tests' directory
- Update test_config.py for new defaults (0.0.0.0:8080)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-03 21:11:29 -05:00

67 lines
1.4 KiB
YAML

services:
# Python MCP Server
app:
build:
context: ..
dockerfile: docker/Dockerfile
image: gitea-mcp-remote:latest
container_name: gitea-mcp-remote-app
restart: unless-stopped
expose:
- "8080"
environment:
# Gitea Configuration (required)
- GITEA_URL=${GITEA_URL}
- GITEA_TOKEN=${GITEA_TOKEN}
- GITEA_OWNER=${GITEA_OWNER}
# Optional Gitea config
- GITEA_REPO=${GITEA_REPO:-}
# HTTP Server Configuration
- HTTP_HOST=0.0.0.0
- HTTP_PORT=8080
# Authentication (optional - for MCP endpoint)
- AUTH_TOKEN=${AUTH_TOKEN:-}
- MCP_AUTH_MODE=${MCP_AUTH_MODE:-optional}
# Tool Filtering (optional)
- ENABLED_TOOLS=${ENABLED_TOOLS:-}
- DISABLED_TOOLS=${DISABLED_TOOLS:-}
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8080/health"]
interval: 30s
timeout: 3s
retries: 3
start_period: 5s
networks:
- gitea-mcp-network
# Caddy Reverse Proxy
caddy:
image: caddy:2-alpine
container_name: gitea-mcp-remote-caddy
restart: unless-stopped
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: