Update environment variables for consistency and defaults in init.py and env.example
This commit is contained in:
@@ -14,8 +14,8 @@ INITIALIZED_FLAG = Path("/var/lib/ldap/.initialized")
|
|||||||
SLAPD_D = Path("/etc/ldap/slapd.d")
|
SLAPD_D = Path("/etc/ldap/slapd.d")
|
||||||
|
|
||||||
|
|
||||||
base_dn = os.environ["LDAP_BASE_DN"]
|
base_dn = os.environ.get("LDAP_BASE_DN") or "dc=example,dc=org"
|
||||||
password = os.environ["LDAP_PASSWORD"]
|
password = os.environ.get("LDAP_PASSWORD") or "changeit"
|
||||||
tls_enabled = os.environ.get("TLS_ENABLED") == "1"
|
tls_enabled = os.environ.get("TLS_ENABLED") == "1"
|
||||||
admin_dn = f"cn=admin,{base_dn}"
|
admin_dn = f"cn=admin,{base_dn}"
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
LDAP_DOMAIN=example.com
|
LDAP_DOMAIN=example.org
|
||||||
LDAP_BASE_DN=dc=example,dc=com
|
LDAP_BASE_DN=dc=example,dc=org
|
||||||
LDAP_ORG=Example Organization
|
LDAP_ORG=Example Organization
|
||||||
LDAP_PASSWORD=ChangeMe123!
|
LDAP_PASSWORD=changeit
|
||||||
LDAP_ADMIN_PASSWORD=ChangeMe123!
|
LDAP_ADMIN_PASSWORD=changeit
|
||||||
|
|||||||
Reference in New Issue
Block a user