A naive example of a python web app hosted in gunicorn.
This is not a production-ready application
Use this app to tune and benchmark in non-production environments.
docker-compose build myapp
docker-compose up
Alternatively you can run the service with a Grafana integration:
docker-compose -f docker-compose.yml -f docker-compose-grafana-prometheus.yml up
and stop the services like this:
docker-compose -f docker-compose.yml -f docker-compose-grafana-prometheus.yml down
Alternatively you can run the service with a Grafana integration. This will require a Datadog API key.
Copy .env.example
to a new file named .env
, uncomment the line containing DD_API_KEY
, and add your key.
Start the services with this command:
docker-compose -f docker-compose-datadog.yml up
and stop the services like this:
docker-compose -f docker-compose-datadog.yml down
NOTE: the service handles requests for these domains:
- example.com
- www.example.com
- grafana.example.com
Be sure to add both domain names to /etc/hosts
file or other domain name resolver.
curl http://example.com/
curl http://example.com/slow-endpoint
- Blueswen/gunicorn-monitoring: high-quality example of integration with Grafana
- ☑️ move configuration out of build and mount into container instead
- ☑️ provide docker-compose.yml
- ☑️ route requests with flask
- ☑️ pin versions to avoid accidental upgrades
- ☑️ add health check
- ☑️ add reverse proxy
- ☑️ add simulated slow upstream server
- ☑️ add simulated buggy endpoint
- ☑️ integrate Grafana
- ◻️ add example with process control delegated to supervisord