-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
209 lines (195 loc) · 5.21 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
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
196
197
198
199
200
201
202
203
204
205
206
207
208
version: '2.1'
networks:
main:
driver: bridge
volumes:
prometheus_data: {}
grafana_data: {}
postgres_data: {}
rails_data: {}
services:
prometheus:
image: prom/prometheus:v2.32.1
container_name: prometheus
volumes:
- ./prometheus:/etc/prometheus
- prometheus_data:/prometheus
command:
- '--config.file=/etc/prometheus/prometheus.yml'
- '--storage.tsdb.path=/prometheus'
- '--web.console.libraries=/etc/prometheus/console_libraries'
- '--web.console.templates=/etc/prometheus/consoles'
- '--storage.tsdb.retention.time=200h'
- '--web.enable-lifecycle'
- '--enable-feature=remote-write-receiver'
restart: unless-stopped
expose:
- 9090
networks:
- main
labels:
org.label-schema.group: "monitoring"
alertmanager:
image: prom/alertmanager:v0.23.0
container_name: alertmanager
volumes:
- ./alertmanager:/etc/alertmanager
command:
- '--config.file=/etc/alertmanager/config.yml'
- '--storage.path=/alertmanager'
restart: unless-stopped
expose:
- 9093
networks:
- main
labels:
org.label-schema.group: "monitoring"
grafana:
image: grafana/grafana:8.3.3
container_name: grafana
volumes:
- grafana_data:/var/lib/grafana
- ./grafana/provisioning/dashboards:/etc/grafana/provisioning/dashboards
- ./grafana/provisioning/datasources:/etc/grafana/provisioning/datasources
environment:
- GF_SECURITY_ADMIN_USER=${ADMIN_USER:-admin}
- GF_SECURITY_ADMIN_PASSWORD=${ADMIN_PASSWORD:-admin}
- GF_USERS_ALLOW_SIGN_UP=false
restart: unless-stopped
ports:
- "3000:3000/tcp"
expose:
- 3000
networks:
- main
labels:
org.label-schema.group: "monitoring"
postgres:
image: "postgres:12"
container_name: postgres
volumes:
- 'postgres_data:/var/lib/postgresql/data'
- ./postgres/postgresql.conf:/etc/postgresql/postgresql.conf
- ./postgres/initdb.d:/docker-entrypoint-initdb.d
networks:
- main
expose:
- 5432
environment:
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-postgres}
ulimits:
nofile:
soft: 64000
hard: 64000
restart: unless-stopped
healthcheck:
test: pg_isready -U postgres
interval: 10s
timeout: 1s
retries: 10
postgres_exporter:
image: quay.io/prometheuscommunity/postgres-exporter:v0.10.1
container_name: postgres_exporter
depends_on: [postgres]
networks:
- main
volumes:
- ./postgres_exporter/queries.xml:/etc/postgres_exporter/queries.xml
environment:
- DATA_SOURCE_NAME=postgresql://postgres:postgres@postgres:5432/postgres?sslmode=disable
- PG_EXPORTER_EXTEND_QUERY_PATH=/etc/postgres_exporter/queries.xml
expose:
- 9187
restart: unless-stopped
labels:
org.label-schema.group: "monitoring"
redis_exporter:
image: oliver006/redis_exporter:v1.34.1
container_name: redis_exporter
depends_on: [redis]
networks:
- main
environment:
REDIS_ADDR: redis://redis:6379
expose:
- 9121
restart: unless-stopped
labels:
org.label-schema.group: "monitoring"
redis:
image: redis:6.2.6
container_name: redis
networks:
- main
expose:
- 6379
restart: unless-stopped
healthcheck:
test: redis-cli ping
interval: 10s
timeout: 1s
retries: 10
rails:
image: chatwoot/chatwoot:v2.1.1
volumes:
- rails_data:/app/storage
depends_on:
- postgres
- redis
networks:
- main
ports:
- '8080:3000'
environment:
- NODE_ENV=production
- RAILS_ENV=production
- INSTALLATION_ENV=docker
- POSTGRES_USERNAME=postgres
- POSTGRES_PASSWORD=postgres
- POSTGRES_HOST=postgres
- POSTGRES_PORT=5432
- SECRET_KEY_BASE=c912fa50716a6b1468d507bdf738560b
- REDIS_URL=redis://redis:6379
- REDIS_URL_SIDEKIQ=redis://redis:6379/0
entrypoint: docker/entrypoints/rails.sh
command: ['bundle', 'exec', 'rails', 's', '-p', '3000', '-b', '0.0.0.0']
sidekiq:
image: chatwoot/chatwoot:v2.1.1
volumes:
- rails_data:/app/storage
networks:
- main
depends_on:
- postgres
- redis
environment:
- NODE_ENV=production
- RAILS_ENV=production
- INSTALLATION_ENV=docker
- REDIS_URL=redis://redis:6379
- REDIS_URL_SIDEKIQ=redis://redis:6379/0
- POSTGRES_USERNAME=postgres
- POSTGRES_PASSWORD=postgres
- POSTGRES_HOST=postgres
- POSTGRES_PORT=5432
- SECRET_KEY_BASE=c912fa50716a6b1468d507bdf738560b
command: ['bundle', 'exec', 'sidekiq', '-C', 'config/sidekiq.yml']
sidekiq_exporter:
image: strech/sidekiq-prometheus-exporter:0.1.16
container_name: sidekiq_exporter
depends_on: [sidekiq]
networks:
- main
environment:
- NODE_ENV=production
- RAILS_ENV=production
- RACK_ENV=production
- INSTALLATION_ENV=docker
- REDIS_URL=redis://redis:6379/0
- SERVER_NAME=sidekiq_exporter
- SERVER_PORT=9292
expose:
- 9292
restart: unless-stopped
labels:
org.label-schema.group: "monitoring"