feat: 增加 OpenLDAP 应用 (#1664)

* feat: 增加 OpenLDAP 应用
This commit is contained in:
BugKing
2024-07-02 11:39:54 +08:00
committed by GitHub
parent 3648f92a05
commit 83737300f5
7 changed files with 132 additions and 0 deletions
+33
View File
@@ -0,0 +1,33 @@
additionalProperties:
formFields:
- envKey: LDAP_ROOT
default: dc=example,dc=org
labelEn: LDAP baseDN
labelZh: LDAP baseDN
random: false
required: true
type: text
- envKey: LDAP_ADMIN_USERNAME
default: admin
labelEn: LDAP admin username
labelZh: LDAP 管理员用户名
random: false
required: true
rule: paramCommon
type: text
- envKey: LDAP_ADMIN_PASSWORD
default: adminpassword
labelEn: LDAP admin password
labelZh: LDAP 管理员密码
random: true
required: true
rule: paramComplexity
type: password
- envKey: LDAP_PORT
default: 1389
edit: true
labelEn: LDAP listening port
labelZh: LDAP 监听端口
required: true
rule: paramPort
type: number
+21
View File
@@ -0,0 +1,21 @@
version: '3'
services:
openldap:
image: bitnami/openldap:2.6.8
container_name: ${CONTAINER_NAME}
restart: always
networks:
- 1panel-network
ports:
- ${LDAP_PORT}:1389
environment:
LDAP_ROOT: ${LDAP_ROOT}
LDAP_ADMIN_USERNAME: ${LDAP_ADMIN_USERNAME}
LDAP_ADMIN_PASSWORD: ${LDAP_ADMIN_PASSWORD}
volumes:
- './data:/bitnami/openldap'
labels:
createdBy: "Apps"
networks:
1panel-network:
external: true
+17
View File
@@ -0,0 +1,17 @@
#!/bin/bash
DIR="./data/"
if [ -d "$DIR" ]; then
echo "目录 $DIR 已存在"
else
echo "目录 $DIR 不存在,正在创建..."
mkdir -p "$DIR"
if [ $? -eq 0 ]; then
echo "目录 $DIR 创建成功"
else
echo "目录 $DIR 创建失败"
fi
fi
chown -R 1001:1001 $DIR
+17
View File
@@ -0,0 +1,17 @@
#!/bin/bash
DIR="./data/"
if [ -d "$DIR" ]; then
echo "目录 $DIR 已存在"
else
echo "目录 $DIR 不存在,正在创建..."
mkdir -p "$DIR"
if [ $? -eq 0 ]; then
echo "目录 $DIR 创建成功"
else
echo "目录 $DIR 创建失败"
fi
fi
chown -R 1001:1001 $DIR