docker-compose.yml 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. services:
  2. gogs-mcp-server:
  3. build:
  4. context: .
  5. dockerfile: Dockerfile
  6. image: gogs-mcp-server:latest
  7. container_name: gogs-mcp-server
  8. environment:
  9. - GOGS_SERVER_URL=${GOGS_SERVER_URL}
  10. - GOGS_ACCESS_TOKEN=${GOGS_ACCESS_TOKEN}
  11. - TRANSPORT_MODE=${TRANSPORT_MODE:-stdio}
  12. - HTTP_PORT=${HTTP_PORT:-3000}
  13. - HTTP_HOST=${HTTP_HOST:-0.0.0.0}
  14. - NODE_ENV=production
  15. # For stdio mode: the server runs as a subprocess by MCP clients
  16. # For HTTP mode: the server runs as a standalone service
  17. stdin_open: true
  18. tty: true
  19. restart: unless-stopped
  20. # Expose port when using HTTP transport mode
  21. ports:
  22. - "${HTTP_PORT:-3000}:${HTTP_PORT:-3000}"
  23. # Uncomment if you need to mount local files for development
  24. # volumes:
  25. # - ./dist:/app/dist:ro
  26. # Optional: Include a Gogs server for local development/testing
  27. # Uncomment the section below if you want to run Gogs locally
  28. # gogs:
  29. # image: gogs/gogs:latest
  30. # container_name: gogs-server
  31. # ports:
  32. # - "10022:22"
  33. # - "3000:3000"
  34. # volumes:
  35. # - gogs-data:/data
  36. # restart: unless-stopped
  37. # volumes:
  38. # gogs-data: