-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose-latest.test.yml
68 lines (65 loc) · 2.28 KB
/
docker-compose-latest.test.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
version: "3.3"
services:
sut:
container_name: test-bench
image: ${IMAGE_TAG}
environment:
TEST_ADDR: ${TEST_ADDR}
volumes:
- ./test.sh:/test.sh:ro
entrypoint: ["/test.sh"]
depends_on:
phpldapadmin:
condition: service_healthy
ldap-server:
condition: service_healthy
phpldapadmin:
container_name: phpldapadmin
image: ${IMAGE_TAG}
environment:
PHPLDAPADMIN_LDAP_HOSTS: "#PYTHON2BASH:[{'ldap-server': [{'server': [{'tls': False}]},{'login': [{'bind_id': 'cn=admin,dc=example,dc=org'}]}]}]"
depends_on:
ldap-server:
condition: service_healthy
healthcheck:
test:
[
"CMD",
"curl",
"-s",
"--fail",
"http://127.0.0.1/.nginx/status",
]
start_period: 5s
interval: 15s
timeout: 1s
ldap-server:
image: botsudo/docker-openldap
command: ldap
restart: on-failure:5
mem_limit: 256M
mem_reservation: 100M
healthcheck:
test: 'ldapwhoami -D "cn=$${DOCKER_LDAP_HEALTHCHECK_USERNAME}" -w "$${DOCKER_LDAP_HEALTHCHECK_PASSWORD}"'
start_period: 5s
interval: 10s
timeout: 5s
retries: 3
environment:
# 256 to enable debug
# See: https://www.openldap.org/doc/admin24/slapdconf2.html
LDAP_LOG_LEVEL: 0
LDAP_OPENLDAP_GID: 0
LDAP_OPENLDAP_UID: 0
LDAP_BASE_DN: "dc=example,dc=org"
LDAP_AUTH_BASE_DN: "ou=people,dc=example,dc=org"
LDAP_ADMIN_PASSWORD: "ldapadminpass"
LDAP_CONFIG_PASSWORD: "ldapconfigpass"
LDAP_MONITOR_PASSWORD: "{SSHA}1h+K1VIdptHytwoqDd+z+ozORIKmGvG3" # monitor
# Only used by healthcheck command defined above
DOCKER_LDAP_HEALTHCHECK_USERNAME: monitor
DOCKER_LDAP_HEALTHCHECK_PASSWORD: monitor
# never | allow | try | demand
LDAP_TLS_VERIFY_CLIENT: "never"
# Add ldaps:/// to SSL listen
LDAP_LISTEN_URLS: "ldap:/// ldapi:///"