-
Notifications
You must be signed in to change notification settings - Fork 37
/
docker-compose.yaml
119 lines (111 loc) · 3.64 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
services:
db:
image: postgres-pg-partman:latest
build:
context: ./postgres
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"
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"
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"
- "8010:8010"
- "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 OTLP
# Since 3.0.0-beta.1, the flag becomes --web.enable-otlp-receiver
# But we are using v2, so that flag is --enable-feature=otlp-write-receiver
# See https://github.com/prometheus/prometheus/blob/main/CHANGELOG.md#300-beta1--2024-10-09
- "--enable-feature=otlp-write-receiver"
ports:
- "9090:9090"
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
elasticsearch_data:
driver: local
openldap_data:
driver: local