-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yaml
139 lines (126 loc) · 3.69 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
# SPDX-License-Identifier: AGPL-3.0-only
# SPDX-FileCopyrightText: 2023-2024 Univention GmbH
---
name: "dev-local"
services:
ldif-producer:
platform: linux/amd64
image: "gitregistry.knut.univention.de/univention/customers/dataport/upx/container-ldap/ldif-producer:${IMAGE_TAG:-latest}"
# entrypoint:
# - "/bin/bash"
# - "-c"
# - "sleep infinity"
build:
dockerfile: ./docker/ldif-producer/Dockerfile
context: ./
environment:
SOCKET_FILE_LOCATION: "/var/lib/univention-ldap/slapd-sock/sock"
NATS_USER: ldif-producer
NATS_PASSWORD: ldifpass
NATS_HOST: "nats"
NATS_PORT: "4222"
NATS_MAX_RECONNECT_ATTEMPTS: 2
MAX_IN_FLIGHT_LDAP_MESSAGES: 10
BACKPRESSURE_WAIT_TIMEOUT: 20
LDAP_THREADS: 5
LDAP_BASE_DN: "dc=univention-organization,dc=intranet"
IGNORE_TEMPORARY_OBJECTS: true
volumes:
- ./tests/base-defaults.conf:/etc/univention/base-defaults.conf:ro
- ldap-socket:/var/lib/univention-ldap/slapd-sock/:rw
ldap-server:
platform: linux/amd64
image: "gitregistry.knut.univention.de/univention/customers/dataport/upx/container-ldap/ldap-server:${IMAGE_TAG:-latest}"
build:
context: ./docker/ldap-server
environment:
LDAP_CN_ADMIN_PW: univention
ports:
- 389:389
- 636:636
## Enable the secrets below if TLS is desired and `directory/manager/starttls` is set.
# secrets:
# - ca_cert
# - cert_pem
# - private_key
# - dh_param
volumes:
- ./tests/base-defaults.conf:/etc/univention/base-defaults.conf:ro
- ${LDAP_SOCKET_LOCATION:-ldap-socket}:/var/lib/univention-ldap/slapd-sock/:rw
nats:
image: "nats:latest"
environment:
jetstream: "enabled"
ports:
- "4222:4222" # Client connections
- "6222:6222" # Route connections
- "8222:8222" # HTTP monitoring port
volumes:
- ./nats.dev.conf:/etc/nats-config/nats.conf
- type: tmpfs
target: /var/run
command: --jetstream -m 8222 -p 4222 -config /etc/nats-config/nats.conf
ldap-admin:
image: osixia/phpldapadmin:0.9.0
environment:
PHPLDAPADMIN_LDAP_HOSTS: "#PYTHON2BASH:[{'ldap-server':{'login':{'bind_id':'cn=admin,dc=univention-organization,dc=intranet'}}}]"
PHPLDAPADMIN_HTTPS: "false"
links:
- ldap-server
ports:
- 8001:80
docs:
image: docker-registry.knut.univention.de/sphinx:latest
working_dir: /docs/docs
volumes:
- ".:/docs"
profiles:
- docs
test:
image: "gitregistry.knut.univention.de/univention/customers/dataport/upx/container-ldap/testrunner:${IMAGE_TAG:-latest}"
build:
dockerfile: ./docker/testrunner/Dockerfile
context: ./
environment:
PYTEST_ADDOPTS: --ldap-server=ldap-server
profiles:
- test
volumes:
- "./tests:/app/tests"
- "./univention:/app/univention"
- "./pyproject.toml:/app/pyproject.toml"
database-initialized-test:
build:
context: "./docker/ldap-server"
target: "pytest"
profiles:
- test
volumes:
- "./:/src/"
# Environment of the pre-commit linter.
pre-commit:
profiles:
- test
image: gitregistry.knut.univention.de/univention/customers/dataport/upx/container-pre-commit/upx-pre-commit:latest
volumes:
- type: bind
source: .
target: /code
- type: volume
# pre-commit installs dependencies, having them cached speeds things up
# a lot.
source: pre-commit-cache
target: /cache
secrets:
ca_cert:
file: ssl/CAcert.pem
cert_pem:
file: ssl/cert.pem
private_key:
file: ssl/cert.key
dh_param:
file: ssl/dh_2048.pem
volumes:
ldap-socket:
pre-commit-cache:
...