Documentation Index
Fetch the complete documentation index at: https://cowswap-mintlify-docs-audit-1776071666.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Docker Deployment
Comprehensive guide for deploying CoW Protocol BFF services using Docker and Docker Compose.Service Architecture
The BFF comprises seven containerized services:| Service | Port(s) | Description |
|---|---|---|
| API | 1500 | API gateway |
| TWAP | 3000 | Time-weighted average price |
| Notification Producer | - | Event monitoring |
| Telegram | - | Bot message delivery |
| PostgreSQL | 5432 | Database |
| RabbitMQ | 5672, 15672 | Message queue |
| Redis | 6379 | Cache |
Building Images
Services utilize NX build targets with multi-stage Dockerfiles based on Alpine Linux:- Based on Alpine Linux with Node.js LTS
- Non-root users for enhanced security
- Production dependencies from built artifacts
Local Development
Environment Setup
Service Dependencies
The Docker Compose configuration defines service dependencies, ensuring proper startup sequencing. For example, the API service depends on the database being available first.Production Deployment
Building for Production
Multi-Platform Builds
platform: linux/amd64, though the queue service omits this for Apple Silicon support.
Running Migrations
Run migrations before deploying new versions:Resource Requirements
Minimum Deployment
| Service | RAM |
|---|---|
| API | 512MB |
| TWAP | 256MB |
| Producer | 256MB |
| Telegram | 128MB |
| PostgreSQL | 1GB |
| RabbitMQ | 512MB |
| Redis | 256MB |
| Total | ~3.3GB |
Recommended Production
Total recommended: ~10GB RAM across services for optimal performance.Health Monitoring
- RabbitMQ and Redis: Built-in health checks with 30-second intervals
- API: Exposes status information at the
/aboutendpoint
Data Persistence
Three named volumes maintain state across container restarts:data-postgres- Database storagedata-rabbitmq- Message queue statedata-redis- Cache data
Database Backup/Restore
Troubleshooting
Port Conflicts
Modify port mappings indocker-compose.yml if ports are already in use: