Add openldap

This commit is contained in:
Marko Korhonen 2021-11-20 15:33:27 +02:00
parent 2f04b029ea
commit 4b51c7ca55
2 changed files with 46 additions and 0 deletions

2
docker/auth/.gitignore vendored Normal file
View file

@ -0,0 +1,2 @@
.ldap_admin_password_secret
.ldap_read_only_password_secret

View file

@ -0,0 +1,44 @@
version: "3.8"
services:
openldap:
container_name: openldap
image: osixia/openldap:1.5.0
restart: always
hostname: ldap.korhonen.cc
ports:
- "389:389"
- "636:636"
environment:
- LDAP_ORGANISATION=Korhonen
- LDAP_DOMAIN=korhonen.cc
- LDAP_ADMIN_PASSWORD_FILE=/run/secrets/ldap_admin_password
- LDAP_READ_ONLY_USER=true
- LDAP_READ_ONLY_USER_USERNAME=ldap-ro
- LDAP_READ_ONLY_USER_PASSWORD_FILE=/run/secrets/ldap_read_only_password
secrets:
- ldap_admin_password
- ldap_read_only_password
volumes:
- "/docker/auth/openldap/ldap:/var/lib/ldap"
- "/docker/auth/openldap/slapd.d/:/etc/ldap/slapd.d"
- "/docker/auth/openldap/lidf:/data/ldif"
phpldapadmin:
container_name: phpldapadmin
image: osixia/phpldapadmin
environment:
- PHPLDAPADMIN_HTTPS=false
- PHPLDAPADMIN_HOSTS=openldap
ports:
- "4588:80"
networks:
auth:
external: true
secrets:
ldap_admin_password:
file: ./.ldap_admin_password_secret
ldap_read_only_password:
file: ./.ldap_read_only_password_secret