forked from open-source-labs/Docketeer
-
-
Notifications
You must be signed in to change notification settings - Fork 45
/
Copy pathdocker-compose-dev.yaml
134 lines (125 loc) · 3.85 KB
/
docker-compose-dev.yaml
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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
version: '3.8'
services:
# The extension's UI/Backend
docketeer:
# Image must be ${DESKTOP_PLUGIN_IMAGE} to be used as an extension
image: ${DESKTOP_PLUGIN_IMAGE}
container_name: docketeer-ext
environment:
- STATUS=development
volumes:
# Opens the docker sock and creates named volumes for persistent data that can be shared between containers
- /var/run/docker.sock:/var/run/docker.sock
- docketeer-ext-prometheus-files:/prometheus
- docketeer-ext-grafana-files:/grafana
- docketeer-ext-initsql:/extension
ports:
- 4000:4000
depends_on:
- memcached
cadvisor:
# Must use cadvisor v0.47.1 instead of latest, latest does not work for macOS
# The docketeer image uploaded is on gcr.io/cadvisor/cadvisor:v0.47.1
image: gcr.io/cadvisor/cadvisor:v0.47.1
container_name: docketeer-ext-cadvisor
expose:
- 8080
ports:
- 49158:8080
volumes:
# Applies the bind mounts in ro (read only) and rw (read write) to be able to scrape containers
- /:/rootfs:ro
- /var/run/docker.sock:/var/run/docker.sock:rw
- /sys:/sys:ro
- /var/lib/docker/:/var/lib/docker:ro
- /etc/machine-id:/etc/machine-id:ro
# Collects additional metrics that are then sent to prometheus
node-exporter:
image: prom/node-exporter:latest
container_name: docketeer-ext-node-exporter
restart: unless-stopped
expose:
- 9100
ports:
- 49157:9100
volumes:
#system info for linux machines
- /proc:/host/proc:ro
# also for linux
- /sys:/host/sys:ro
#root
- /:/rootfs:ro
# Set up the node-exporter to scrape resource metrics
# Dockerfile handles this if you're using the uploaded images
command:
- --path.procfs=/host/proc
- --path.rootfs=/rootfs
- --path.sysfs=/host/sys
- --collector.filesystem.mount-points-exclude=^/(sys|proc|dev|host|etc)($$|/)
# Collects metrics and makes them available at localhost:9090
prometheus:
image: prom/prometheus:latest
container_name: docketeer-ext-prometheus
restart: unless-stopped
expose:
- 9090
ports:
- 49156:9090
volumes:
- docketeer-ext-prometheus-files:/etc/prometheus
- docketeer-ext-prometheus-data:/prometheus
# Tells prometheus to use the config file from ./imageConfigs/prometheus
# Dockerfile handles this if you're using the uploaded images
command:
- --config.file=/etc/prometheus/prometheus.yml
depends_on:
- docketeer
- node-exporter
- cadvisor
# Displays metrics gathered from containers at localhost:2999, 3000 is for kubernetes which is not set up for the extension
grafana:
image: grafana/grafana:latest
container_name: docketeer-ext-grafana
expose:
- 3000
ports:
- 49155:3000
volumes:
- docketeer-ext-grafana-files:/etc/grafana
environment:
GF_PATHS_CONFIG: /etc/grafana/grafana.ini
depends_on:
- prometheus
# Store metrics gathered from containers at localhost:5432
postgres:
# build:
# context: ..
# dockerfile: ./extension/dockerfile.postgres
# image: docketeer-postgres
image: postgres:16.0-alpine3.18
container_name: docketeer-ext-postgres
expose:
- 5432
ports:
- 5432:5432
volumes:
- postgres_volume:/var/lib/postgresql/data
- docketeer-ext-initsql:/docker-entrypoint-initdb.d/
environment:
- POSTGRES_PASSWORD=admin
- POSTGRES_USER=admin
- POSTGRES_DB=docketeer
depends_on:
- docketeer
# Setup memcached caching server at port 11211
memcached:
image: memcached:latest
container_name: docketeer-ext-memcached
ports:
- 49259:11211
volumes:
docketeer-ext-prometheus-data:
docketeer-ext-prometheus-files:
docketeer-ext-grafana-files:
docketeer-ext-initsql:
postgres_volume: