Skip to content
docker-compose.yml 1.37 KiB
Newer Older
# vim:ff=unix:ts=2:sw=2:ai:expandtab
nimrod's avatar
nimrod committed
---
version: '3.5'
nimrod's avatar
nimrod committed
services:
nimrod's avatar
nimrod committed
  ldap:
nimrod's avatar
nimrod committed
      cache_from:
        - adarnimrod/slapd
    domainname: "${LDAP_HOSTNAME:-ldap}.${LDAP_DOMAIN:-nowhere.com}"
      LDAP_ROOTPASS: &password "${LDAP_ROOTPASS:-foo}"
nimrod's avatar
nimrod committed
      LDAP_DOMAIN: "${LDAP_DOMAIN:-nowhere.com}"
      LDAP_ORGANIZATION: "${LDAP_ORGANIZATION:-none}"
    hostname: "${LDAP_HOSTNAME:-ldap}"
nimrod's avatar
nimrod committed
    image: adarnimrod/slapd
    restart: always
    volumes:
      - _run_slapd:/run/slapd
      - ldap:/var/lib/ldap
      - backup_ldap:/var/backups/ldap
  nss-pam-ldapd:
    build:
      context: nss-pam-ldapd/
    command: /usr/sbin/nslcd --debug --nofork
    depends_on:
      - ldap
      LDAP_BASE_DN: &base_dn "${LDAP_BASE_DN:-dc=nowhere,dc=com}"
      - _run_slapd:/run/slapd
  ldap-account-manager:
    build:
nimrod's avatar
nimrod committed
      cache_from:
        - adarnimrod/ldap-account-manager
      context: ldap-account-manager/
nimrod's avatar
nimrod committed
      - ldap
    environment:
      LAM_PASSWORD: *password
      LDAP_ADMIN_DN: "cn=admin,${LDAP_BASE_DN:-dc=nowhere,dc=com}"
      LDAP_BASE_DN: *base_dn
nimrod's avatar
nimrod committed
    image: adarnimrod/ldap-account-manager
    restart: always
    volumes:
      - _run_slapd:/run/slapd
nimrod's avatar
nimrod committed
volumes:
  _run_slapd:
  backup_ldap:
    labels:
      snapshot: 'true'