mirror of
https://github.com/deuill/coreos-home-server.git
synced 2024-09-21 05:30:45 +00:00
gitea: Add lldap
as service dependency
This commit is contained in:
parent
491bed37a8
commit
9b6e002d11
@ -18,14 +18,14 @@ if ! test -f /var/lib/gitea/gitea.db; then
|
||||
gosu git /usr/bin/gitea -c /etc/gitea/config.ini migrate
|
||||
|
||||
# Set up LDAP authentication via local service.
|
||||
gosu git /usr/bin/gitea -c /etc/gitea/config.ini admin auth add-ldap --name "LDAP" \
|
||||
--host "${GITEA_AUTH_LDAP_HOST}" --port "${GITEA_AUTH_LDAP_PORT}" \
|
||||
--synchronize-users --security-protocol unencrypted \
|
||||
--bind-dn "uid=${GITEA_AUTH_LDAP_BIND_UID},ou=people,dc=ldap,dc=local" --bind-password "${GITEA_AUTH_LDAP_BIND_PASSWORD}" \
|
||||
--user-search-base "ou=people,dc=ldap,dc=local" --user-filter "(&(memberof=cn=gitea_user,ou=groups,dc=ldap,dc=local)(|(uid=%[1]s)(mail=%[1]s)))" \
|
||||
--admin-filter "(memberof=cn=gitea_admin,ou=groups,dc=ldap,dc=local)" \
|
||||
--username-attribute "uid" --email-attribute "mail" \
|
||||
--firstname-attribute "givenName" --surname-attribute "sn" --avatar-attribute "jpegPhoto"
|
||||
gosu git /usr/bin/gitea -c /etc/gitea/config.ini admin auth add-ldap \
|
||||
--name "LDAP" --host "${GITEA_AUTH_LDAP_HOST}" --port "${GITEA_AUTH_LDAP_PORT}" \
|
||||
--synchronize-users --security-protocol unencrypted \
|
||||
--bind-dn "uid=${GITEA_AUTH_LDAP_BIND_UID},ou=people,dc=ldap,dc=local" --bind-password "${GITEA_AUTH_LDAP_BIND_PASSWORD}" \
|
||||
--user-search-base "ou=people,dc=ldap,dc=local" --user-filter "(&(memberof=cn=gitea_user,ou=groups,dc=ldap,dc=local)(|(uid=%[1]s)(mail=%[1]s)))" \
|
||||
--admin-filter "(memberof=cn=gitea_admin,ou=groups,dc=ldap,dc=local)" \
|
||||
--username-attribute "uid" --email-attribute "mail" \
|
||||
--firstname-attribute "givenName" --surname-attribute "sn" --avatar-attribute "jpegPhoto"
|
||||
fi
|
||||
|
||||
# Run entrypoint under specific user.
|
||||
|
@ -1,7 +1,7 @@
|
||||
[Unit]
|
||||
Description=Gitea Self-Hosted Git Service
|
||||
Wants=container-build@%N.service container-volume@%N.service
|
||||
After=container-build@%N.service container-volume@%N.service
|
||||
Wants=container-build@%N.service container-volume@%N.service lldap.service
|
||||
After=container-build@%N.service container-volume@%N.service lldap.service
|
||||
|
||||
[Service]
|
||||
Type=notify
|
||||
|
Loading…
Reference in New Issue
Block a user