86 lines
4.2 KiB
Plaintext
Raw Normal View History

services:
2025-01-22 17:45:37 +01:00
{% if ldap_webinterface == 'lam' %}
lam:
image: ghcr.io/ldapaccountmanager/lam:{{ldap_lam_version}} # Dies ist das Docker-Image für LAM
container_name: lam
logging:
driver: journald
restart: {{docker_restart_policy}}
ports:
- 127.0.0.1:{{http_port}}:80
environment: # See all variables here: https://github.com/LDAPAccountManager/lam/blob/develop/lam-packaging/docker/.env
# Basic Configuration
LAM_PASSWORD: {{ldap_lam_administrator_password}} # LAM configuration master password and password for server profile "lam
# Database
LAM_CONFIGURATION_DATABASE: files # configuration database (files or mysql) @todo implement mariadb
# LDAP Configuration
LDAP_SERVER: ldap://openldap:389 # LDAP server URL
LDAP_DOMAIN: {{domain}} # domain of LDAP database root entry, will be converted to dc=...,dc=...
LDAP_BASE_DN: {{ldap_root}} # LDAP base DN to overwrite value generated by LDAP_DOMAIN
LDAP_USER: {{ldap_admin_dn}} # LDAP admin user (set as login user for LAM)
LDAP_ADMIN_PASSWORD: {{ldap_administrator_database_password}} # LDAP admin password
{% elif ldap_webinterface == 'phpldapadmin' %}
2025-01-21 16:50:43 +01:00
phpldapadmin:
2025-01-22 17:45:37 +01:00
image: leenooks/phpldapadmin:{{ldap_phpldapadmin_version}}
2025-01-21 16:50:43 +01:00
logging:
driver: journald
restart: {{docker_restart_policy}}
ports:
- 127.0.0.1:{{http_port}}:8080
environment:
# @See https://github.com/leenooks/phpLDAPadmin/wiki/Docker-Container
APP_URL: https://{{domain}}
2025-01-21 19:44:47 +01:00
LDAP_HOST: openldap
2025-01-22 17:45:37 +01:00
{% endif %}
openldap:
2025-01-22 17:45:37 +01:00
image: bitnami/openldap:{{ldap_openldap_version}}
2025-01-21 14:09:06 +01:00
logging:
driver: journald
restart: {{docker_restart_policy}}
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
environment:
2025-01-21 16:50:43 +01:00
# @See https://hub.docker.com/r/bitnami/openldap
2025-01-21 14:09:06 +01:00
# GENERAL
2025-01-22 11:08:33 +01:00
## Database
2025-01-22 17:45:37 +01:00
LDAP_ADMIN_USERNAME: {{ldap_administrator_username}} # LDAP database admin user.
2025-01-22 11:08:33 +01:00
LDAP_ADMIN_PASSWORD: {{ldap_administrator_database_password}} # LDAP database admin password.
## Users
2025-01-22 11:25:39 +01:00
LDAP_USERS: ' ' # Comma separated list of LDAP users to create in the default LDAP tree. Default: user01,user02
LDAP_PASSWORDS: ' ' # Comma separated list of passwords to use for LDAP users. Default: bitnami1,bitnami2
2025-01-22 11:08:33 +01:00
LDAP_ROOT: {{ldap_root}} # LDAP baseDN (or suffix) of the LDAP tree. Default: dc=example,dc=org
## Admin
LDAP_ADMIN_DN: {{ldap_admin_dn}} # Not well documented. Don't know if this has an effect
LDAP_CONFIG_ADMIN_ENABLED: yes
LDAP_CONFIG_ADMIN_USERNAME: {{ldap_administrator_username}}
LDAP_CONFIG_ADMIN_PASSWORD: {{ldap_administrator_password}}
# Network
LDAP_PORT_NUMBER: {{ldap_localhost_port}} # Route to default port
LDAP_ENABLE_TLS: no # Using nginx proxy for tls
LDAP_LDAPS_PORT_NUMBER: {{ldap_secure_localhost_port}} # Port used for TLS secure traffic. Priviledged port is supported (e.g. 636). Default: 1636 (non privileged port).
# Security
2025-01-22 11:25:14 +01:00
LDAP_ALLOW_ANON_BINDING: no # Allow anonymous bindings to the LDAP server. Default: yes.
2025-01-21 12:41:44 +01:00
volumes:
2025-01-21 14:09:06 +01:00
- 'data:/bitnami/openldap'
2025-01-21 19:44:47 +01:00
healthcheck:
test: >
2025-01-22 11:08:33 +01:00
ldapsearch -x -H ldap://localhost:389 -b "{{ldap_root}}" -D "{{ldap_admin_dn}}" -w "{{ldap_administrator_database_password}}"
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' %}
{% include 'templates/docker/compose/volumes.yml.j2' %}
data:
{% include 'templates/docker/compose/networks.yml.j2' %}