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
Createdocker-compose.yml:
3. Create Environment File
Create.env file:
4. Create Configuration Directory
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 scriptmonitor.sh:
Troubleshooting
Common Issues
Container won't start
Container won't start
Agent can't connect to virtual server
Agent can't connect to virtual server
MCP servers not working
MCP servers not working
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