Created
May 24, 2021 13:45
-
-
Save EmmanuelOuzan/7f38a4db78b16aed0037b4ebc185d83a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: "3.5" | |
services: | |
flask-api: | |
build: | |
context: ./api | |
restart: unless-stopped | |
container_name: flask-api | |
image: example-flask-api | |
ports: | |
- "5000:5000" | |
example-prometheus: | |
image: prom/prometheus:latest | |
restart: unless-stopped | |
container_name: example-prometheus | |
ports: | |
- 9090:9090 | |
volumes: | |
- ./monitoring/prometheus.yml:/etc/prometheus/prometheus.yml | |
command: | |
- '--config.file=/etc/prometheus/prometheus.yml' | |
example-grafana: | |
image: grafana/grafana:latest | |
restart: unless-stopped | |
user: "472" | |
container_name: example-grafana | |
depends_on: | |
- example-prometheus | |
ports: | |
- 3000:3000 | |
volumes: | |
- ./monitoring/datasource.yml:/etc/grafana/provisioning/datasources/datasource.yml | |
- ./monitoring/dashboard_provision.yml:/etc/grafana/provisioning/dashboards/dashboard_provision.yml | |
- ./monitoring/grafana_dashboard.json:/etc/grafana/provisioning/dashboards/grafana_dashboard.json | |
env_file: | |
- ./monitoring/config.monitoring | |
cadvisor: | |
image: gcr.io/google-containers/cadvisor:latest | |
container_name: cAdvisor-Emmanuel | |
ports: | |
- 8080:8080 | |
volumes: | |
- /:/rootfs:ro | |
- /var/run:/var/run:ro | |
- /sys:/sys:ro | |
- /var/lib/docker/:/var/lib/docker:ro | |
- /dev/disk/:/dev/disk:ro | |
restart: always |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment