-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
77 lines (77 loc) · 1.99 KB
/
docker-compose.yaml
File metadata and controls
77 lines (77 loc) · 1.99 KB
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
version: '3.9'
services:
postgres:
image: postgres:15.3-alpine
container_name: postgres
ports:
- 5432:5432
volumes:
- postgres_data:/usr/share/postgres/data
env_file:
- ./db/.env.local.db
# instead, we could have created a `environment` section, with
# with the env vars in .env.local.db file.
profiles:
- dev
- prod
postgres_test:
image: postgres:15.3-alpine
container_name: postgres_test
env_file:
- ./db/.env.test.db
ports:
- "${POSTGRES_TEST_PORT}:5432"
profiles:
- test
grafana:
image: grafana/grafana-enterprise:9.5.2
container_name: grafana
ports:
- 3000:3000
# user: root
volumes:
- grafana_data:/usr/share/grafana/data
env_file:
- ./grafana/.env.local.grafana
profiles:
- dev
prometheus:
image: prom/prometheus:latest
container_name: prometheus
ports:
- 9090:9090
command:
- --config.file=/etc/prometheus/prometheus.yml
volumes:
# The short syntax uses a single string with colon-separated values to specify a
# volume mount (VOLUME:CONTAINER_PATH),
# or an access mode (VOLUME:CONTAINER_PATH:ACCESS_MODE).
# VOLUME: MAY be either a host path on the platform hosting containers (bind mount) or
# a volume name.
# CONTAINER_PATH: the path in the container where the volume is mounted.
- prometheus_data:/usr/share/prometheus/data # volume name:container path
- ./prometheus.yml:/etc/prometheus/prometheus.yml:ro # host path: container path
depends_on:
- cadvisor
profiles:
- dev
cadvisor:
image: gcr.io/cadvisor/cadvisor:latest
container_name: cadvisor
ports:
- 8080:8080
volumes:
- cadvisor_data:/usr/share/cadvisor/data
- /:/rootfs:ro
- /var/run:/var/run:rw
- /sys:/sys:ro
- /var/lib/docker/:/var/lib/docker:ro
depends_on:
- postgres
profiles:
- dev
volumes:
postgres_data:
grafana_data:
cadvisor_data:
prometheus_data: