Skip to content
docker-compose.yml 1.89 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
  auth:
    environment:
      LDAP_BASE_DN: "ou=People,${LDAP_BASE_DN:-dc=shore,dc=co,dc=il}"
      LDAP_OBJECTS_DN: "dn"
      LDAP_OPENLDAP: !!str true
      LDAP_REALM_NAME: shore.co.il authentication
      LDAP_USER_OBJECT_FILTER: "(&(objectclass=inetOrgPerson)(uid=%s))"
      SECRET_KEY: "${SECRET_KEY:-qwerty123}"
    hostname: auth.shore.co.il
    image: registry.shore.co.il/ldap-auth
    restart: always
    volumes:
      - _run_slapd:/run/slapd

  crond:
    build:
      context: crond/
nimrod's avatar
nimrod committed
    restart: always
    volumes:
      - /run/docker.sock:/run/docker.sock

nimrod's avatar
nimrod committed
  ldap:
    build:
      context: slapd/
    environment:
      LDAP_ROOTPASS: &password "${LDAP_ROOTPASS:-foo}"
nimrod's avatar
nimrod committed
      LDAP_DOMAIN: "${LDAP_DOMAIN:-shore.co.il}"
      LDAP_ORGANIZATION: "${LDAP_ORGANIZATION:-shore}"
      #SLAPD_DEBUG_LEVEL: "any"
      SSL_DHPARAMS_FILE: /var/ssl/dhparams
    hostname: "${LDAP_HOSTNAME:-ldap}.${LDAP_DOMAIN:-shore.co.il}"
    restart: always
    volumes:
      - _run_slapd:/run/slapd
      - ldap:/var/lib/ldap
      - backup_ldap:/var/backups/ldap
nimrod's avatar
nimrod committed
      - /var/ssl/dhparams:/var/ssl/dhparams:ro
  ldap-account-manager:
    build:
      context: ldap-account-manager/
nimrod's avatar
nimrod committed
      - ldap
    environment:
nimrod's avatar
nimrod committed
      LAM_PASSWORD: *password  # pragma: allowlist secret
      LDAP_ADMIN_DN: "cn=admin,${LDAP_BASE_DN:-dc=shore,dc=co,dc=il}"
      LDAP_BASE_DN: &base_dn "${LDAP_BASE_DN:-dc=shore,dc=co,dc=il}"
    restart: always
    volumes:
      - _run_slapd:/run/slapd
nimrod's avatar
nimrod committed
  # nss-pam-ldapd:
  #   build:
  #     context: nss-pam-ldapd/
  #   command: /usr/sbin/nslcd --debug --nofork
  #   depends_on:
  #     - ldap
  #   environment:
  #     LDAP_BASE_DN: *base_dn
  #   volumes:
  #     - _run_slapd:/run/slapd

nimrod's avatar
nimrod committed
volumes:
  _run_slapd:
nimrod's avatar
nimrod committed
    name: run_slapd
  backup_ldap:
    labels:
      snapshot: 'true'