-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose.yml
202 lines (181 loc) · 4.13 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
version: '3.8'
x-templates:
common: &common
env_file: .env
# hostname: "{{ .Service.Name }}" for possible future
networks:
- backend
# @todo override by service
loki-pipeline-stages: &loki-pipeline-stages |
- regex:
expression: '(level|lvl|severity)=(?P<level>\w+)'
- labels:
level:
loki-logging: &loki-logging
logging:
driver: loki
options:
loki-url: http://host.docker.internal:${LOKI_PORT}/loki/api/v1/push
no-file: "false"
loki-pipeline-stages: *loki-pipeline-stages
networks:
backend:
driver: bridge
configs:
loki:
file: ./configs/loki/config.yml
promtail:
file: ./configs/promtail/config.yml
secrets: {}
volumes: {}
services:
php:
<<: [*common, *loki-logging]
build:
context: ./images/php
args:
- PHP_VERSION=8.1
tty: true
extra_hosts:
- "host.docker.internal:host-gateway"
ports:
- ${PHP_PORT}:8080
volumes:
- ${DOCKER_CACHE_PATH}/php:/var/log/php
- ${DOCKER_PROJECT_PATH}:/app
angie:
<<: [*common, *loki-logging]
profiles:
- angie
depends_on:
- php
build:
context: ./images/angie
args:
- FASTCGI_PASS=php:9000
ports:
- ${ANGIE_PORT}:80
- ${ANGIE_PORT_SECURED}:443
volumes:
- ${DOCKER_CACHE_PATH}/angie:/var/log/angie
- ${DOCKER_PROJECT_PATH}/public:/app/public
redis:
<<: [*common, *loki-logging]
profiles:
- redis
image: redis:latest
command: redis-server
ports:
- ${REDIS_PORT}:6379
volumes:
- ${DOCKER_CACHE_PATH}/redis:/data
postgres:
<<: [*common, *loki-logging]
profiles:
- postgres
image: postgres:latest
command: postgres
ports:
- ${POSTGRES_PORT}:5432
volumes:
- ${DOCKER_CACHE_PATH}/postgres:/var/lib/postgresql/data
tarantool:
<<: [*common, *loki-logging]
profiles:
- tarantool
image: tarantool/tarantool:latest
ports:
- ${TARANTOOL_PORT}:8123
volumes:
- ${DOCKER_CACHE_PATH}/tarantool:/var/lib/tarantool
clickhouse:
<<: [*common, *loki-logging]
profiles:
- clickhouse
image: clickhouse/clickhouse-server:latest
ports:
- ${CLICKHOUSE_PORT}:8123
volumes:
- ${DOCKER_CACHE_PATH}/clickhouse:/var/lib/clickhouse
consul:
<<: *common
profiles:
- consul
image: consul:latest
ports:
- ${CONSUL_PORT}:8500
volumes:
- ${DOCKER_CACHE_PATH}/consul:/consul/data
vault:
<<: *common
profiles:
- vault
image: vault:latest
ports:
- ${VAULT_PORT}:8200
volumes:
- ${DOCKER_CACHE_PATH}/vault:/vault/data
kafka:
<<: [*common, *loki-logging]
profiles:
- kafka
image: bitnami/kafka:latest
ports:
- ${KAFKA_PORT}:9092
volumes:
- ${DOCKER_CACHE_PATH}/kafka:/bitnami/kafka
kowl:
<<: *common
profiles:
- kafka
depends_on:
- kafka
image: rsmnarts/kowl:latest
entrypoint: ./kowl
ports:
- ${KOWL_PORT}:8080
prometheus:
<<: *common
profiles:
- prometheus
image: prom/prometheus:latest
ports:
- ${PROMETHEUS_PORT}:9090
volumes:
- ${DOCKER_CACHE_PATH}/prometheus:/prometheus
promtail:
<<: *common
profiles:
- loki
configs:
- source: promtail
target: /etc/promtail/config
image: grafana/promtail:latest
command: -config.file=/etc/promtail/config.yml
volumes:
- ${DOCKER_CACHE_PATH}/promtail/logs:/var/log
loki:
<<: *common
profiles:
- loki
configs:
- source: loki
target: /etc/loki/config.yaml
image: grafana/loki:latest
command: -config.file=/etc/loki/config.yaml
ports:
- ${LOKI_PORT}:3100
volumes:
- ${DOCKER_CACHE_PATH}/loki/chunks:/loki/chunks
- ${DOCKER_CACHE_PATH}/loki/rules:/loki/rules
grafana:
<<: *common
profiles:
- prometheus
- loki
image: grafana/grafana:latest
ports:
- ${GRAFANA_PORT}:3000
volumes:
- ${DOCKER_CACHE_PATH}/grafana/data:/var/lib/grafana
- ${DOCKER_CACHE_PATH}/grafana/logs:/var/log/grafana