-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.grafana.yml
195 lines (184 loc) · 6.47 KB
/
docker-compose.grafana.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
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
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
version: "3.7"
services:
# Database
postgres:
container_name: postgres
image: postgres:12.2-alpine # use official postgres version 12.2
restart: unless-stopped
volumes:
- database-data:/var/lib/postgresql/data/ # persist data even if container shuts down
environment:
POSTGRES_USER: docker
POSTGRES_PASSWORD: docker
POSTGRES_DB: acm
POSTGRES_HOST: localhost
POSTGRES_PORT: 5432
PGDATA: /var/lib/postgresql/data/
ports:
- target: 5432 # the port inside the container
published: 35432 # the publicly exposed port
protocol: tcp # the port protocol (tcp or udp)
mode: bridge # bridge networks are used to connect multiple containers together
# Database Administration Tool
pgadmin:
container_name: pgadmin
image: dpage/pgadmin4
depends_on:
- postgres
environment:
PGADMIN_DEFAULT_EMAIL: "[email protected]"
PGADMIN_DEFAULT_PASSWORD: "PgAdmin2020!"
volumes:
- ./mocks:/pgadmin4/mocks
- ./database.json:/pgadmin4/servers.json
ports:
- target: 80 # the port inside the container
published: 8080 # the publicly exposed port
protocol: tcp # the port protocol (tcp or udp)
mode: bridge # bridge networks are used to connect multiple containers together
# Website written in Angular
chapter-website:
container_name: Chapter-Website
image: chapter-website:v0.3.0
restart: unless-stopped
build:
context: ../Chapter-Website
dockerfile: Dockerfile
depends_on:
- half-dome
- tuolumne
- tenaya
ports:
- target: 4200 # the port inside the container
published: 4200 # the publicly exposed port
protocol: tcp # the port protocol (tcp or udp)
mode: bridge # bridge networks are used to connect multiple containers together
# Member Management API written in Nodejs
half-dome:
container_name: Half-Dome
image: half-dome:v0.2.7
restart: unless-stopped
build:
context: ../Half-Dome
dockerfile: Dockerfile
env_file:
- ../Half-Dome/.env
depends_on:
- postgres
- pgadmin
environment:
POSTGRES_HOST: host.docker.internal
POSTGRES_PORT: 35432
POSTGRES_DB: acm
POSTGRES_USER: docker
POSTGRES_PASSWORD: docker
ports:
- target: 4201 # the port inside the container
published: 4201 # the publicly exposed port
protocol: tcp # the port protocol (tcp or udp)
mode: bridge # bridge networks are used to connect multiple containers together
# Workshop Management API written in PHP
tuolumne:
container_name: Tuolumne
image: tuolumne:v1.0
restart: unless-stopped
build:
context: ../Tuolumne
dockerfile: Dockerfile
env_file:
- ../Tuolumne/.env
depends_on:
- postgres
- pgadmin
environment:
DB_HOST: host.docker.internal
DB_PORT: 35432
DB_DATABASE: acm
DB_USERNAME: docker
DB_PASSWORD: docker
ports:
- target: 4202 # the port inside the container
published: 4202 # the publicly exposed port
protocol: tcp # the port protocol (tcp or udp)
mode: bridge # bridge networks are used to connect multiple containers together
# Events Management API written in Golang
tenaya:
container_name: Tenaya
image: tenaya:v1.0
restart: unless-stopped
build:
context: ../Tenaya
dockerfile: Dockerfile
env_file:
- ../Tenaya/.env
depends_on:
- postgres
- pgadmin
environment:
DB_HOST: host.docker.internal
DB_PORT: 35432
DB_DATABASE: acm
DB_USER: docker
DB_PASSWORD: docker
PORT: 4203
ports:
- target: 4203 # the port inside the container
published: 4203 # the publicly exposed port
protocol: tcp # the port protocol (tcp or udp)
mode: bridge # bridge networks are used to connect multiple containers together
prometheus:
image: prom/prometheus:latest
container_name: monitoring_prometheus
restart: unless-stopped
volumes:
- ../prometheus/config:/etc/prometheus/
- ../prometheus/data:/prometheus
command:
- "--config.file=/etc/prometheus/prometheus.yml"
- "--storage.local.path=/prometheus"
expose:
- 9090
ports:
- target: 9090 # the port inside the container
published: 9090 # the publicly exposed port
protocol: tcp # the port protocol (tcp or udp)
mode: bridge # bridge networks are used to connect multiple containers together
links:
- cadvisor:cadvisor
- node-exporter:node-exporter
node-exporter:
image: prom/node-exporter:latest
container_name: monitoring_node_exporter
restart: unless-stopped
expose:
- 9100
cadvisor:
image: google/cadvisor:latest
container_name: monitoring_cadvisor
restart: unless-stopped
volumes:
- /:/rootfs:ro
- /var/run:/var/run:rw
- /sys:/sys:ro
- /var/lib/docker/:/var/lib/docker:ro
expose:
- 8080
grafana:
image: grafana/grafana:latest
container_name: monitoring_grafana
restart: unless-stopped
links:
- prometheus:prometheus
volumes:
- ../grafana:/var/lib/grafana
environment:
- GF_SECURITY_ADMIN_PASSWORD=MYPASSWORT
- GF_USERS_ALLOW_SIGN_UP=false
- GF_SERVER_DOMAIN=myrul.com
- GF_SMTP_ENABLED=true
- GF_SMTP_HOST=smtp.gmail.com:587
- GF_SMTP_PASSWORD=mypassword
volumes:
database-data: # named volumes can be managed easier using docker-compose