mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-01-26 00:42:22 +01:00
51 lines
2.3 KiB
Django/Jinja
51 lines
2.3 KiB
Django/Jinja
services:
|
|
phpldapadmin:
|
|
image: leenooks/phpldapadmin:{{ldap_admin_version}}
|
|
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}}
|
|
LDAP_HOST: openldap
|
|
openldap:
|
|
image: bitnami/openldap:{{ldap_version}}
|
|
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:
|
|
# @See https://hub.docker.com/r/bitnami/openldap
|
|
|
|
# GENERAL
|
|
LDAP_ADMIN_USERNAME: {{ldap_administrator_username}} # LDAP database admin user.
|
|
LDAP_ADMIN_PASSWORD: {{ldap_administrator_password}} # LDAP database admin password.
|
|
#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,bitnami
|
|
LDAP_ROOT: {{ldap_root}} # LDAP baseDN (or suffix) of the LDAP tree. Default: dc=example,dc=org
|
|
LDAP_ADMIN_DN: {{ldap_admin_dn}}
|
|
LDAP_PORT_NUMBER: {{ldap_localhost_port}} # Route to default port
|
|
|
|
# TLS
|
|
LDAP_ENABLE_TLS: no # Using nginx proxy
|
|
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).
|
|
volumes:
|
|
- {{cert_mount_directory}}:/certs:ro
|
|
- 'data:/bitnami/openldap'
|
|
healthcheck:
|
|
test: >
|
|
ldapsearch -x -H ldap://localhost:389 -b "{{ldap_root}}" -D "{{ldap_admin_dn}}" -w "{{ldap_administrator_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' %}
|