-
Notifications
You must be signed in to change notification settings - Fork 107
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
201 lines (187 loc) · 6.26 KB
/
docker-compose.yaml
File metadata and controls
201 lines (187 loc) · 6.26 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
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
services:
# When you change this service, please also change the corresponding service in `find . -name docker-compose.yaml`
postgres16:
build:
context: ./postgres/postgres16
volumes:
- postgres16_data:/var/lib/postgresql/data
- ./postgresql.conf:/etc/postgresql/postgresql.conf
- ./pg_hba.conf:/etc/postgresql/pg_hba.conf
# NOTE(postgresql-tls): Uncomment the following lines to enable TLS
#- ./tls-cert.pem:/etc/postgresql/server.crt
#- ./tls-key.pem:/etc/postgresql/server.key
command:
- postgres
- "-c"
- "config_file=/etc/postgresql/postgresql.conf"
- "-c"
- "hba_file=/etc/postgresql/pg_hba.conf"
environment:
POSTGRES_USER: "postgres"
POSTGRES_PASSWORD: "postgres"
ports:
# In case you need to use psql or other GUI client to connect to the database,
# you need to connect via the 6432 port.
# Otherwise, psql or other GUI client will consume the connection count.
- "6432:5432"
pgbouncer:
image: edoburu/pgbouncer:v1.24.1-p1
command:
- pgbouncer
- /etc/pgbouncer/pgbouncer.ini
volumes:
- ./pgbouncer.ini:/etc/pgbouncer/pgbouncer.ini
- ./pgbouncer-users.txt:/etc/pgbouncer/users.txt
# NOTE(postgresql-tls): Uncomment the following lines to enable TLS
#- ./tls-cert.pem:/etc/pgbouncer/server.crt
#- ./tls-key.pem:/etc/pgbouncer/server.key
#- ./rootCA.pem:/etc/pgbouncer/ca.crt
ports:
- "5432:5432"
# When you change this service, please also change the corresponding service in `find . -name docker-compose.yaml`
redis:
# Azure cache for Redis supports 6.0 only
image: redis:6.0.20
# NOTE(redis-tls): In case you want to test Redis TLS, uncomment the following lines
# command:
# - redis-server
# - /usr/local/etc/redis/redis.conf
volumes:
- redis_data:/data
# NOTE(redis-tls): In case you want to test Redis TLS, uncomment the following lines
# tls-cert.pem and tls-key.pem are generated with `make mkcert`.
# - ./redis.conf:/usr/local/etc/redis/redis.conf
# - ./tls-cert.pem:/usr/local/etc/redis/redis.crt
# - ./tls-key.pem:/usr/local/etc/redis/redis.key
ports:
- "6379:6379"
elasticsearch:
# It seems 7.16.2 has some problem with cgroup.
# This problem occurs when I switched to containerd in Docker Desktop for macOS.
# Using the latest 7 (As of 2024-02-25, it is 7.17.27) solves this problem.
image: docker.elastic.co/elasticsearch/elasticsearch:7.17.27
environment:
discovery.type: single-node
ports:
- "9200:9200"
- "9300:9300"
volumes:
- elasticsearch_data:/usr/share/elasticsearch/data
proxy:
# nginx has mainline (1.odd_minor_version) and stable (1.even_minor_version) release.
# We use stable here.
image: nginx:stable
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf
- ./tls-key.pem:/etc/nginx/tls-key.pem
- ./tls-cert.pem:/etc/nginx/tls-cert.pem
ports:
- "8000:8000"
- "8001:8001"
- "8010:8010"
- "8011:8011"
- "8100:8100"
- "3100:3100"
- "443:443"
prometheus:
image: prom/prometheus:v2.55.1
command:
# These 4 arguments are original found in the Dockerfile.
# See https://github.com/prometheus/prometheus/blob/v2.55.1/Dockerfile#L25
# Since we have to add extra arguments, we need to repeat them here.
# See https://prometheus.io/docs/prometheus/latest/installation/#setting-command-line-parameters
- "--config.file=/etc/prometheus/prometheus.yml"
- "--storage.tsdb.path=/prometheus"
- "--web.console.libraries=/usr/share/prometheus/console_libraries"
- "--web.console.templates=/usr/share/prometheus/consoles"
# Enable remote write
- "--web.enable-remote-write-receiver"
ports:
- "9090:9090"
otelcol:
image: otel/opentelemetry-collector-contrib:0.114.0
volumes:
- ./otelcol-config.yaml:/etc/otelcol-contrib/config.yaml
ports:
- "4318:4318"
minio:
image: quay.io/minio/minio:RELEASE.2024-11-07T00-52-20Z
command:
- "minio"
- "server"
- "/data"
- "--console-address"
- ":9001"
volumes:
- minio_data:/data
ports:
- "9000:9000"
- "9001:9001"
environment:
# This can be used as access key ID.
# But do not do this in production.
# See https://min.io/docs/minio/linux/administration/identity-access-management/minio-user-management.html#minio-root-user
MINIO_ROOT_USER: "minio"
# This must be at least 8 characters
# this can be used as secret access key.
# But do not do this in production.
# See https://min.io/docs/minio/linux/administration/identity-access-management/minio-user-management.html#minio-root-user
MINIO_ROOT_PASSWORD: "secretpassword"
ldap:
profiles: ["ldap"]
image: bitnami/openldap:2.6
ports:
- "1389:1389"
- "1636:1636"
volumes:
- openldap_data:/bitnami/openldap
environment:
LDAP_ADMIN_USERNAME: "admin"
LDAP_ADMIN_PASSWORD: "adminpassword"
LDAP_ADMIN_DN: "cn=admin,dc=example,dc=org"
LDAP_ROOT: "dc=example,dc=org"
phpldapadmin:
profiles: ["ldap"]
image: osixia/phpldapadmin:stable
ports:
- "18080:80"
environment:
PHPLDAPADMIN_LDAP_HOSTS: "#PYTHON2BASH:[{'ldap': [{'server': [{'tls': False}, {'port': 1389}]},{'login': [{'bind_id': 'cn=admin,dc=example,dc=org'},{'bind_pass': 'adminpassword'}]}]}]"
PHPLDAPADMIN_HTTPS: "false"
PHPLDAPADMIN_LDAP_CLIENT_TLS: "false"
loki:
image: grafana/loki:3.3.2
command: -config.file=/etc/loki/config.yaml
volumes:
- ./loki-config.yaml:/etc/loki/config.yaml
ports:
- "3102:3100"
tempo:
image: grafana/tempo:2.6.1
command: ["-config.file=/etc/tempo.yaml"]
volumes:
- ./tempo-config.yaml:/etc/tempo.yaml
ports:
- "3104:3200"
grafana:
profiles: ["grafana"]
image: grafana/grafana:11.3.0
environment:
- GF_AUTH_ANONYMOUS_ENABLED=true
- GF_AUTH_ANONYMOUS_ORG_ROLE=Admin
- GF_AUTH_DISABLE_LOGIN_FORM=true
volumes:
- ./grafana-datasources.yaml:/etc/grafana/provisioning/datasources/datasources.yaml
ports:
- "3103:3000"
volumes:
redis_data:
driver: local
postgres16_data:
driver: local
elasticsearch_data:
driver: local
openldap_data:
driver: local
minio_data:
driver: local