Created
February 1, 2017 07:33
-
-
Save aimakun/e7eacceda5248be06cd23e055e290cb1 to your computer and use it in GitHub Desktop.
Docker Compose file samples for demonstrate global containers monitoring (Graphite + Collectd + Grafana)
This file contains 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: "2" | |
services: | |
graphite: | |
image: mackerel/graphite | |
restart: always | |
ports: | |
- "8000:8000" | |
- "2003:2003" | |
- "2004:2004" | |
volumes: | |
- ./tmp/log:/var/log/graphite | |
- ./tmp/whisper:/var/lib/graphite/storage/whisper | |
collectd: | |
image: bobrik/collectd-docker | |
restart: always | |
volumes: | |
- /var/run/docker.sock:/var/run/docker.sock | |
environment: | |
GRAPHITE_HOST: graphite | |
COLLECTD_HOST: docker | |
COLLECTD_INTERVAL: 10 | |
grafana: | |
image: grafana/grafana | |
restart: always | |
ports: | |
- "3000:3000" | |
environment: | |
VIRTUAL_HOST: "grafana.dev" ## | |
ENABLE_HTTP: "true" |
This file contains 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
# Shared volumes for mounting application source code | |
data: | |
image: busybox | |
volumes: | |
- .:/data | |
# Database with specific configurations (eg. no strict transactions) | |
db: | |
image: aimakun/mysql | |
ports: | |
- "3306" | |
environment: | |
MYSQL_DATABASE: test_project_dev ## | |
MYSQL_ROOT_PASSWORD: root ## | |
COLLECTD_DOCKER_APP: "test_project" | |
COLLECTD_DOCKER_TASK: "db" | |
# MYSQL_USER: clientuser | |
# MYSQL_PASSWORD: clientpassword | |
# Redis for simulate parallel processes | |
queue: | |
image: redis | |
ports: | |
- "6379" | |
# Bundle all needed libraries here (eg. locales, phpunit, artisan commands, etc.) | |
web: | |
image: aimakun/docker-laravel4-projects:dev-dispatcher | |
ports: | |
- "80" | |
volumes_from: | |
- data | |
links: | |
- db | |
- queue | |
environment: | |
MYSQL_HOST: db | |
SITE_ENV: dev_docker | |
VIRTUAL_HOST: "test_project.dev" ## | |
ENABLE_HTTP: "true" | |
COLLECTD_DOCKER_APP: "test_project" | |
COLLECTD_DOCKER_TASK: "web" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment