From 299510f6eca0bf295c7d1a625ba01d59f229e077 Mon Sep 17 00:00:00 2001 From: Kevin Veen-Birkenbach Date: Tue, 21 Jan 2025 12:41:44 +0100 Subject: [PATCH] Added more hints for ldap --- roles/docker-ldap/README.md | 1 + .../templates/docker-compose.yml.j2 | 52 ++++++++++++------- 2 files changed, 33 insertions(+), 20 deletions(-) diff --git a/roles/docker-ldap/README.md b/roles/docker-ldap/README.md index be03a08d..be992170 100644 --- a/roles/docker-ldap/README.md +++ b/roles/docker-ldap/README.md @@ -4,3 +4,4 @@ Draft role for an LDAP implementation with sso. - [ChatGPT Conversation](https://chat.openai.com/share/77919994-5d44-4a64-877d-b572d67483d4) - [Discouse Documentation](https://forum.veen.world/t/cymais-ldap-implementierung-documentation/49) - [Setup Guide](https://goneuland.de/ldap-nextcloud-und-mailserver-in-docker/) +- https://hub.docker.com/r/bitnami/openldap \ No newline at end of file diff --git a/roles/docker-ldap/templates/docker-compose.yml.j2 b/roles/docker-ldap/templates/docker-compose.yml.j2 index 3002b3e4..0f4bb8ef 100644 --- a/roles/docker-ldap/templates/docker-compose.yml.j2 +++ b/roles/docker-ldap/templates/docker-compose.yml.j2 @@ -1,24 +1,36 @@ +version: '2' + +networks: + my-network: + driver: bridge services: openldap: - image: osixia/openldap:1.2.4 - environment: - - LDAP_ORGANISATION=MeineFirma - - LDAP_DOMAIN=meinefirma.de - - LDAP_ADMIN_PASSWORD=admin + image: bitnami/openldap:2 ports: - - "389:389" - - "636:636" - volumes: - - ./ldap:/var/lib/ldap - - ./ldap-slapd:/etc/ldap/slapd.d + - '389:1389' + - '636:1636' + environment: + - LDAP_ADMIN_USERNAME=admin + - LDAP_ADMIN_PASSWORD=adminpassword + - LDAP_USERS=user01,user02 # Comma separated list of LDAP users to create in the default LDAP tree. Default: user01,user02 + - LDAP_PASSWORDS=password1,password2 #Comma separated list of passwords to use for LDAP users. Default: bitnami1,bitnami2 + + - LDAP_ROOT=dc=example,dc=org + - LDAP_ADMIN_DN=cn=admin,dc=example,dc=org - keycloak: - image: jboss/keycloak:latest - environment: - - KEYCLOAK_USER=admin - - KEYCLOAK_PASSWORD=admin - - DB_VENDOR=h2 - ports: - - "8080:8080" - depends_on: - - openldap + - MARIADB_ROOT_PASSWORD=root-password + - MARIADB_GALERA_MARIABACKUP_PASSWORD=backup-password + - MARIADB_USER=customuser + - MARIADB_DATABASE=customdatabase + - MARIADB_ENABLE_LDAP=yes + networks: + - my-network + volumes: + - 'openldap_data:/bitnami/openldap' + myapp: + image: 'YOUR_APPLICATION_IMAGE' + networks: + - my-network +volumes: + openldap_data: + driver: local