A production-ready template for running multi-process applications on DigitalOcean App Platform using Supervisord.
Supervisord is a process control system for UNIX-like systems. It's designed for application-level process management, making it ideal for containerized environments where you need to run multiple related processes together.
- Web Service + Monitoring: Run your application with OpenTelemetry Collector or other monitoring sidecars
- Multi-Process Applications: Applications that need multiple related processes in one container
- Sidecar Pattern: Run auxiliary processes alongside your main application (logging agents, proxies, etc.)
Running Processes:
- Flask Web App - Example application on port 8080 with OpenTelemetry instrumentation
- OTEL Collector - OpenTelemetry sidecar for observability
- Both managed by Supervisord (process manager)
Endpoints:
- Process dashboard at
/showing all running processes - Health check endpoint at
/health - Test trace endpoint at
/test-traceto verify OTEL instrumentation
┌─────────────────────────────────────┐
│ DigitalOcean App Platform │
│ │
│ ┌───────────────────────────────┐ │
│ │ Container (Port 8080) │ │
│ │ │ │
│ │ ┌─────────────────────────┐ │ │
│ │ │ Supervisord (PID 1) │ │ │
│ │ └──────────┬──────────────┘ │ │
│ │ │ │ │
│ │ ┌────────┴────────┐ │ │
│ │ │ │ │ │
│ │ ┌─▼──────┐ ┌────▼─────┐ │ │
│ │ │ Flask │ │ OTEL │ │ │
│ │ │ Web │ │ Agent │ │ │
│ │ │ App │ │ (Sidecar)│ │ │
│ │ │ :8080 │ │ │ │ │
│ │ └────────┘ └──────────┘ │ │
│ │ │ │
│ └───────────────────────────────┘ │
└─────────────────────────────────────┘
supervisord-appplatform/
├── .do/
│ ├── app.yaml # App Platform deployment spec
│ └── deploy.template.yaml # Deploy button template
├── app/
│ ├── app.py # Example Flask application
│ ├── requirements.txt # Python dependencies
│ └── start.sh # Application startup script
├── config/
│ ├── supervisord.conf # Supervisord configuration
│ └── otel-collector-config.yaml # OpenTelemetry Collector config
├── Dockerfile # Container definition
├── docker-compose.yml # Local development setup
└── Makefile # Development commands
Click the "Deploy to DigitalOcean" button above to deploy instantly with zero configuration.
# Clone the repository
git clone https://github.com/AppPlatform-Templates/supervisord-appplatform.git
cd supervisord-appplatform
# Deploy to App Platform
doctl apps create --spec .do/app.yamlTo customize: Fork this repo, update the repo reference in your chosen template (.do/ folder) to point to your fork, then deploy.
Run locally using Docker Compose:
docker-compose upAccess the app at http://localhost:8080 or http://127.0.0.1:8080
See LOCAL_DEVELOPMENT.md for detailed local development instructions.
By default, traces/logs/metrics are exported to console logs (visible in App Platform Runtime Logs).
To send to production backends (Grafana Cloud, Datadog, Honeycomb, etc.), see OTEL_PRODUCTION.md.
To disable OTEL, remove the [program:otel-collector] section from config/supervisord.conf.
- Supervisord Documentation
- DigitalOcean App Platform Documentation
- App Spec Reference
- Troubleshooting Guide
- Local Development Guide
- GitHub Issues: Report bugs or request features
- DigitalOcean Community: community.digitalocean.com
- Support: DigitalOcean Support