services: {% include 'roles/docker-oauth2-proxy/templates/container.yml.j2' %} {{applications.ldap.webinterface}}: container_name: {{applications.ldap.webinterface}} logging: driver: journald restart: {{docker_restart_policy}} {% if applications.ldap.webinterface == 'lam' %} image: ghcr.io/ldapaccountmanager/lam:{{applications.ldap.lam.version}} # Dies ist das Docker-Image für LAM ports: - 127.0.0.1:{{http_port}}:80 env_file: - "{{docker_compose.directories.env}}lam.env" {% elif applications.ldap.webinterface == 'phpldapadmin' %} image: leenooks/phpldapadmin:{{applications.ldap.phpldapadmin.version}} ports: - 127.0.0.1:{{http_port}}:8080 env_file: - "{{docker_compose.directories.env}}phpldapadmin.env" {% endif %} openldap: image: bitnami/openldap:{{applications.ldap.openldap.version}} container_name: openldap {% include 'roles/docker-compose/templates/services/base.yml.j2' %} {% if applications.ldap.openldap.expose_to_internet | bool %} ports: - 127.0.0.1:{{ldap_localhost_port}}:{{ldap_localhost_port}} # Expose just on localhost so that nginx stream proxy can use it - 127.0.0.1:{{ldap_secure_localhost_port}}:{{ldap_secure_localhost_port}} # Expose just on localhost {% endif %} volumes: - 'data:/bitnami/openldap' healthcheck: test: > ldapsearch -x -H ldap://localhost:389 -b "{{ldap_root}}" -D "{{ldap_admin_dn}}" -w "{{applications.ldap.administrator_database_password}}" interval: 30s timeout: 10s retries: 3 start_period: 20s {% include 'templates/docker/container/networks.yml.j2' %} {% include 'templates/docker/compose/volumes.yml.j2' %} data: {% include 'templates/docker/compose/networks.yml.j2' %}