mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-01-26 00:42:22 +01:00
61 lines
2.8 KiB
Django/Jinja
61 lines
2.8 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
|
|
## Database
|
|
LDAP_ADMIN_USERNAME: {{ldap_administrator_username}} # LDAP database admin user.
|
|
LDAP_ADMIN_PASSWORD: {{ldap_administrator_database_password}} # LDAP database admin password.
|
|
|
|
## Users
|
|
#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
|
|
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
|
|
LDAP_ALLOW_ANON_BINDING: no # Allow anonymous bindings to the LDAP server. Default: yes.
|
|
volumes:
|
|
- 'data:/bitnami/openldap'
|
|
healthcheck:
|
|
test: >
|
|
ldapsearch -x -H ldap://localhost:389 -b "{{ldap_root}}" -D "{{ldap_admin_dn}}" -w "{{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' %}
|