This repository has been archived by the owner on Aug 28, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
87 lines (77 loc) · 2.06 KB
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
#
# This docker-compose file is used only for local testing.
# Includes more than one monitoring solution: Datadog, Prometheus and Grafana.
# I use it mostly for testing and comparing monitoring and logging solutions.
#
version: '3.1'
# Persistent volumes for Prometheus and Grafana
volumes:
prometheus_data: {}
grafana_data: {}
# Front-end and Back-end networks
networks:
front:
back:
services:
plaas:
#image: biosan/plaas:latest # TODO: Use a DockerHub image
build: .
environment:
- PORT=8080
ports:
- 8080:8080
networks:
- front
- back
restart: always
labels:
com.datadoghq.ad.logs: '[{"source": "gunicorn", "service": "plaas"}]'
prometheus:
image: prom/prometheus:v2.1.0
volumes:
- ./config/prometheus.yml:/etc/prometheus/prometheus.yml
- prometheus_data:/prometheus
command:
- '--config.file=/etc/prometheus/prometheus.yml'
- '--storage.tsdb.path=/prometheus'
- '--web.console.libraries=/usr/share/prometheus/console_libraries'
- '--web.console.templates=/usr/share/prometheus/consoles'
ports:
- 9090:9090
depends_on:
- plaas
networks:
- back
restart: always
grafana:
image: grafana/grafana
user: "104"
depends_on:
- prometheus
ports:
- 3000:3000
volumes:
- grafana_data:/var/lib/grafana
#- ./grafana/provisioning/:/etc/grafana/provisioning/
#env_file:
# - ./grafana/config.monitoring
networks:
- back
- front
restart: always
datadog:
image: datadog/agent:latest
networks:
- back
- front
environment:
- DD_API_KEY
- DD_LOGS_ENABLED=true
- DD_LOGS_CONFIG_CONTAINER_COLLECT_ALL=true
- DD_AC_EXCLUDE="name:datadog-agent"
volumes:
- ./config/datadog_prometheus_config.yml:/etc/datadog-agent/conf.d/prometheus.d/conf.yaml
- /var/run/docker.sock:/var/run/docker.sock
- /proc/:/host/proc/:ro
- /sys/fs/cgroup:/host/sys/fs/cgroup:ro
#- /opt/datadog-agent/run:/opt/datadog-agent/run:rw