2023-12-22 09:11:40 +01:00
|
|
|
services:
|
2025-01-26 22:16:58 +01:00
|
|
|
|
|
|
|
{% include 'roles/docker-oauth2-proxy/templates/container.yml.j2' %}
|
|
|
|
|
2025-02-03 11:44:13 +01:00
|
|
|
{{applications.ldap.webinterface}}:
|
|
|
|
container_name: {{applications.ldap.webinterface}}
|
2025-01-22 17:45:37 +01:00
|
|
|
logging:
|
|
|
|
driver: journald
|
|
|
|
restart: {{docker_restart_policy}}
|
2025-02-03 11:44:13 +01:00
|
|
|
{% if applications.ldap.webinterface == 'lam' %}
|
|
|
|
image: ghcr.io/ldapaccountmanager/lam:{{applications.ldap.lam.version}} # Dies ist das Docker-Image für LAM
|
2025-01-22 17:45:37 +01:00
|
|
|
ports:
|
2025-02-21 03:53:27 +01:00
|
|
|
- 127.0.0.1:{{ports.localhost.http.ldap}}:80
|
2025-02-04 22:37:07 +01:00
|
|
|
env_file:
|
|
|
|
- "{{docker_compose.directories.env}}lam.env"
|
2025-01-22 17:45:37 +01:00
|
|
|
|
2025-02-03 11:44:13 +01:00
|
|
|
{% elif applications.ldap.webinterface == 'phpldapadmin' %}
|
|
|
|
image: leenooks/phpldapadmin:{{applications.ldap.phpldapadmin.version}}
|
2025-01-21 16:50:43 +01:00
|
|
|
ports:
|
2025-02-21 03:53:27 +01:00
|
|
|
- 127.0.0.1:{{ports.localhost.http.ldap}}:8080
|
2025-02-04 22:37:07 +01:00
|
|
|
env_file:
|
|
|
|
- "{{docker_compose.directories.env}}phpldapadmin.env"
|
2025-01-22 17:45:37 +01:00
|
|
|
{% endif %}
|
2023-12-22 09:11:40 +01:00
|
|
|
openldap:
|
2025-02-03 11:44:13 +01:00
|
|
|
image: bitnami/openldap:{{applications.ldap.openldap.version}}
|
2025-02-12 12:41:13 +01:00
|
|
|
container_name: {{applications.ldap.openldap.hostname}}
|
2025-02-04 22:37:07 +01:00
|
|
|
{% include 'roles/docker-compose/templates/services/base.yml.j2' %}
|
2025-02-12 12:41:13 +01:00
|
|
|
{% if applications.ldap.openldap.network.public | bool %}
|
2023-12-22 09:11:40 +01:00
|
|
|
ports:
|
2025-02-12 12:41:13 +01:00
|
|
|
- 127.0.0.1:{{ports.localhost.ldap.openldap}}:{{ldap_docker_port}} # Expose just on localhost so that nginx stream proxy can use it
|
2025-02-06 17:15:33 +01:00
|
|
|
{% endif %}
|
2025-01-21 12:41:44 +01:00
|
|
|
volumes:
|
2025-01-21 14:09:06 +01:00
|
|
|
- 'data:/bitnami/openldap'
|
2025-02-12 12:41:13 +01:00
|
|
|
- '{{ldif_host_path}}:{{ldif_docker_path}}:ro' # Mounting all ldif files for import
|
2025-01-21 19:44:47 +01:00
|
|
|
healthcheck:
|
|
|
|
test: >
|
2025-02-18 21:00:14 +01:00
|
|
|
ldapsearch -x -H ldap://localhost:{{ldap_docker_port}} -b "{{ldap.dn.root}}" -D "{{ldap.dn.bind}}" -w "{{ldap.bind_credential}}"
|
2025-01-21 19:44:47 +01:00
|
|
|
interval: 30s
|
|
|
|
timeout: 10s
|
|
|
|
retries: 3
|
|
|
|
start_period: 20s
|
2025-01-21 14:09:06 +01:00
|
|
|
{% include 'templates/docker/container/networks.yml.j2' %}
|
2025-01-30 12:14:18 +01:00
|
|
|
|
2025-01-21 14:09:06 +01:00
|
|
|
{% include 'templates/docker/compose/volumes.yml.j2' %}
|
|
|
|
data:
|
|
|
|
|
|
|
|
{% include 'templates/docker/compose/networks.yml.j2' %}
|