Quick Start: LDAP by Bitnami

Quick Start: LDAP by Bitnami

Prerequisite

Traefik on HTTP

OR

Traefik on HTTPS

If HTTP, remove the tls: {} in dynamic configuration

Preparation

compose.yml

For much more information, please reference here.

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
version: Compose specification

services:
ldap:
image: bitnami/openldap
restart: always
environment:
- LDAP_ADMIN_USERNAME=admin
- LDAP_ADMIN_PASSWORD=secret
- LDAP_ROOT=dc=chaos,dc=io
# for using phpldapadmin, config 389 and 636
# if not, remove the following two environments
- LDAP_PORT_NUMBER=389
- LDAP_LDAPS_PORT_NUMBER=636
volumes:
- openldap:/bitnami/openldap
networks:
- traefik-net

ldapadmin:
image: osixia/phpldapadmin
restart: always
environment:
- PHPLDAPADMIN_LDAP_HOSTS=ldap
# if configure https by traefik, you need to configure the following two lines
# if not, remove them
- VIRTUAL_HOST=ldap.x.internal
- PHPLDAPADMIN_HTTPS=false
networks:
- traefik-net
volumes:
openldap:

networks:
traefik-net:
external: true

ldap.yml in dir dynamic-conf

You should touch ldap.yml in traefik dir dynamic-conf.

For much more information, please reference the Prerequisite.

1
2
3
4
5
6
7
8
9
10
11
12
13
http:
routers:
ldap:
rule: "Host(`ldap.x.internal`)"
service: "ldap"
tls: { }

services:
ldap:
loadBalancer:
servers:
- url: "http://ldapadmin"

Config domain parse

1
echo "127.0.0.1 bitnami-ldap.x.internal\n" >> /etc/hosts

Run

1
2
3
docker compose up -d
# docker compose -p bitnami-ldap up -d
# docker compose -f ./compose.yml -p bitnami-ldap up -d

Access: https://bitnami-ldap.x.internal