-
Notifications
You must be signed in to change notification settings - Fork 37
/
Copy pathdocker-compose.yaml
174 lines (163 loc) · 5.21 KB
/
docker-compose.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
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
services:
db:
# When you change this, please also change ./e2e/docker-compose.yaml
image: postgres12-pg-partman-pgaudit:latest
build:
context: ./postgres/postgres12
volumes:
- db_data:/var/lib/postgresql/data
- ./postgresql.conf:/etc/postgresql/postgresql.conf
command: ["postgres", "-c", "config_file=/etc/postgresql/postgresql.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"
db16:
# This database is not actually used now.
# Guard this with a profile first.
profiles: ["postgres16"]
image: postgres16-pg-partman-pgaudit:latest
build:
context: ./postgres/postgres16
volumes:
- db16_data:/var/lib/postgresql/data
- ./postgresql.conf:/etc/postgresql/postgresql.conf
command: ["postgres", "-c", "config_file=/etc/postgresql/postgresql.conf"]
environment:
POSTGRES_USER: "postgres"
POSTGRES_PASSWORD: "postgres"
ports:
- "6432:5432"
pgbouncer:
image: bitnami/pgbouncer:1.23.1
ports:
- "5432:5432"
environment:
PGBOUNCER_PORT: "5432"
# 120 is the default value.
PGBOUNCER_MAX_CLIENT_CONN: "120"
PGBOUNCER_DATABASE: "*"
POSTGRESQL_DATABASE: "postgres"
POSTGRESQL_HOST: "db"
POSTGRESQL_PORT: "5432"
POSTGRESQL_USERNAME: "postgres"
POSTGRESQL_PASSWORD: "postgres"
PGBOUNCER_DSN_0: "app=host=db port=5432 dbname=postgres"
PGBOUNCER_DSN_1: "audit=host=db port=5432 dbname=postgres"
PGBOUNCER_DSN_2: "search=host=db port=5432 dbname=postgres"
PGBOUNCER_LOG_CONNECTIONS: "1"
PGBOUNCER_LOG_DISCONNECTIONS: "1"
redis:
# Azure cache for Redis supports 6.0 only
image: redis:6.0.20
volumes:
- redis_data:/data
ports:
- "6379:6379"
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:7.16.2
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"
- "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"
volumes:
redis_data:
driver: local
db_data:
driver: local
db16_data:
driver: local
elasticsearch_data:
driver: local
openldap_data:
driver: local
minio_data:
driver: local