Single Node Deployment
Deploy a production-ready OpenLDAP server with custom schemas and auto-loaded sample data. Two reference deployments are provided — choose the one that fits your needs.Vibhuvi Corporation — Global Employee Directory
A corporate LDAP directory with 28 employees from 25+ countries across 8 departments, using a customvibhuviEmployee objectClass.
Project Files
openldap-vibhuvi
Explorer
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
services: openldap: image: ${LDAP_IMAGE:-openldap:local} container_name: openldap-vibhuvi hostname: openldap-vibhuvi env_file: - .env.vibhuvi ports: - "390:389" - "637:636" volumes: - ldap-data:/var/lib/ldap - ldap-config:/etc/openldap/slapd.d - ./logs:/logs - ./custom-schema:/custom-schema:ro - ./sample/employee_data_global.ldif:/data/employee_data_global.ldif:ro - ./init/init-data.sh:/docker-entrypoint-initdb.d/init-data.sh:ro # Security: Drop all capabilities and add only required ones security_opt: - no-new-privileges:true cap_drop: - ALL cap_add: - DAC_READ_SEARCH - DAC_OVERRIDE - NET_BIND_SERVICE - SETUID - SETGID - CHOWN # Grace period for clean shutdown stop_grace_period: 30s restart: unless-stopped # Resource limits deploy: resources: limits: memory: 512M cpus: '1.0' reservations: memory: 128M # Log rotation logging: driver: json-file options: max-size: "10m" max-file: "3" networks: - ldap-shared-network volumes: ldap-data: ldap-config: networks: ldap-shared-network: external: true
YAMLUTF-8
Ln 625 files
Start
# Create the shared network (if not already created)
docker network create ldap-shared-network 2>/dev/null || true
docker compose up -d
# Wait for initialization and data loading
sleep 50
Verify
# Count employees (expect 28)
docker exec openldap-vibhuvi ldapsearch -x -H ldap://localhost:389 \
-b "ou=People,dc=vibhuvi,dc=com" \
-D "cn=Manager,dc=vibhuvi,dc=com" -w changeme \
"(objectClass=vibhuviEmployee)" dn | grep -c "^dn:"
# Search by department
docker exec openldap-vibhuvi ldapsearch -x -H ldap://localhost:389 \
-b "ou=People,dc=vibhuvi,dc=com" \
-D "cn=Manager,dc=vibhuvi,dc=com" -w changeme \
"(department=Engineering)" uid cn department
# Search by employee ID
docker exec openldap-vibhuvi ldapsearch -x -H ldap://localhost:389 \
-b "ou=People,dc=vibhuvi,dc=com" \
-D "cn=Manager,dc=vibhuvi,dc=com" -w changeme \
"(employeeID=E001)" uid cn
Employee Data Summary
| Department | Count | Example Locations |
|---|---|---|
| Engineering | 5 | Japan, Spain, India |
| Sales | 5 | USA, UAE, Sweden |
| Marketing | 3 | UK, Mexico, Nigeria |
| HR | 3 | South Korea, Ireland, India |
| Finance | 3 | Germany, Australia, Egypt |
| IT Operations | 3 | Russia, Portugal, Ghana |
| Product Management | 3 | USA, Singapore, Argentina |
| Customer Success | 3 | Pakistan, Denmark, Nigeria |
Custom Schema Attributes
The vibhuviEmployee objectClass extends inetOrgPerson with:
| Attribute | Description |
|---|---|
employeeID | Unique employee identifier |
department | Department name |
jobTitle | Job title |
hireDate | Date of hire |
salary | Salary (string) |
manager | DN of the employee's manager |
Connection Details
| Setting | Value |
|---|---|
| Host | localhost |
| LDAP Port | 390 |
| LDAPS Port | 637 |
| Bind DN | cn=Manager,dc=vibhuvi,dc=com |
| Base DN | dc=vibhuvi,dc=com |
| Password | changeme |
VibhuviOiO — Mahabharata Character Directory
A themed LDAP directory with 20 characters and 5 groups from the Mahabharata, using a customMahabharataUser objectClass.
Project Files
openldap-vibhuvioio
Explorer
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
services: openldap: image: ${LDAP_IMAGE:-openldap:local} container_name: openldap-vibhuvioio hostname: openldap-vibhuvioio env_file: - .env.vibhuvioio ports: - "389:389" - "636:636" volumes: - ldap-data:/var/lib/ldap - ldap-config:/etc/openldap/slapd.d - ./logs:/logs - ./custom-schema:/custom-schema:ro - ./sample/mahabharata_data.ldif:/data/mahabharata_data.ldif:ro - ./init/init-data.sh:/docker-entrypoint-initdb.d/init-data.sh:ro # Security: Drop all capabilities and add only required ones security_opt: - no-new-privileges:true cap_drop: - ALL cap_add: - DAC_READ_SEARCH - DAC_OVERRIDE - NET_BIND_SERVICE - SETUID - SETGID - CHOWN # Grace period for clean shutdown stop_grace_period: 30s restart: unless-stopped # Resource limits deploy: resources: limits: memory: 512M cpus: '1.0' reservations: memory: 128M # Log rotation logging: driver: json-file options: max-size: "10m" max-file: "3" networks: - ldap-shared-network volumes: ldap-data: ldap-config: networks: ldap-shared-network: external: true
YAMLUTF-8
Ln 625 files
Start
docker compose up -d
sleep 45
Verify
# Count users (expect 20)
docker exec openldap-vibhuvioio ldapsearch -x -H ldap://localhost:389 \
-b "ou=People,dc=vibhuvioio,dc=com" \
-D "cn=Manager,dc=vibhuvioio,dc=com" -w changeme \
"(objectClass=inetOrgPerson)" dn | grep -c "^dn:"
# List all groups
docker exec openldap-vibhuvioio ldapsearch -x -H ldap://localhost:389 \
-b "ou=Groups,dc=vibhuvioio,dc=com" \
-D "cn=Manager,dc=vibhuvioio,dc=com" -w changeme \
"(objectClass=groupOfNames)" cn
Data Summary
20 Users across 6 roles:| Role | Characters |
|---|---|
| Pandavas (5) | arjuna, bhima, yudhishthira, nakula, sahadeva |
| Kauravas (3) | duryodhana, dushasana, karna |
| Advisors/Elders (3) | krishna, bhishma, drona |
| Warriors (3) | abhimanyu, ashwatthama, kripacharya |
| Royalty (3) | draupadi, kunti, gandhari |
| Leaders (3) | vidura, shakuni, dhritarashtra |
Custom Schema Attributes
The MahabharataUser objectClass adds:
| Attribute | Description |
|---|---|
kingdom | Character's kingdom |
weapon | Signature weapon |
role | Role in the story |
allegiance | Faction allegiance |
isWarrior | Boolean — is a warrior |
isAdmin | Boolean — is an administrator |
Connection Details
| Setting | Value |
|---|---|
| Host | localhost |
| LDAP Port | 389 |
| LDAPS Port | 636 |
| Bind DN | cn=Manager,dc=vibhuvioio,dc=com |
| Base DN | dc=vibhuvioio,dc=com |
| Password | changeme |
Data Persistence
Both deployments use Docker volumes for persistent data:-
Data survives
docker compose down(without-v) - Init scripts check for existing data and skip reloading
-
Only deleted with
docker compose down -v
Cleanup
# Stop but keep data
docker compose down
# Stop and remove all data
docker compose down -v