Skip to main content

Deploy with Docker Compose

Use Docker Compose to deploy WeaveMCP agents for local development and testing environments.

Prerequisites

  • Docker and Docker Compose installed
  • WeaveMCP account with virtual server created
  • Agent token generated from the web console

Quick Setup

1. Create Directory Structure

2. Create Docker Compose File

Create docker-compose.yml:

3. Create Environment File

Create .env file:

4. Create Configuration Directory

Create config/mcp-servers.json:

Deployment

Start Services

Verify Deployment

Advanced Configuration

With MCP Server Volumes

To provide MCP servers access to local files:

With External Dependencies

If your MCP servers need databases or other services:

Development Mode

For local development with hot reloading:

Monitoring and Logs

Log Management

View and manage logs:

Health Monitoring

Create a simple monitoring script monitor.sh:

Troubleshooting

Common Issues

Debug Mode

Enable debug mode for detailed logging:

Clean Restart

To completely reset the deployment:

Production Considerations

Resource Limits

Set resource limits for production:

Security

  • Use Docker secrets for sensitive data
  • Run containers as non-root users
  • Keep images updated
  • Use specific image tags instead of latest
  • Enable Docker Content Trust

Backup Strategy

Next Steps

Kubernetes Deployment

Scale to production with Kubernetes

AWS EC2 Deployment

Deploy on Amazon Web Services

Monitoring Guide

Set up comprehensive monitoring

Custom MCP Servers

Build your own MCP server integrations