Browse Source

gogs: Fix entrypoint script

multi_domain
ßingen 6 years ago
parent
commit
04b3bc511b
1 changed files with 6 additions and 1 deletions
  1. +6
    -1
      images/gogs/docker-entrypoint.sh

+ 6
- 1
images/gogs/docker-entrypoint.sh View File

@@ -130,9 +130,14 @@ sed -i "s/LDAP_SEARCH_BASE/${LDAP_SEARCH_BASE}/g" ${LDAP_FILE}

# Create admin user if DB was new
if [ -z "${DB_EXISTS}" ]; then
su -c git "${GOGS_PATH}/gogs admin create-user --name admin --password ${GOGS_ADMIN_PWD} --admin --email ${ADMIN_EMAIL}"
su git -c "${GOGS_PATH}/gogs admin create-user --name admin --password ${GOGS_ADMIN_PWD} --admin --email ${ADMIN_EMAIL}"
fi

# Rewrite authorized keys. See issue:
# https://github.com/gogs/gogs/issues/1688#issuecomment-143265108
# https://github.com/gogs/gogs/issues/4435
su git -c "${GOGS_PATH}/gogs admin rewrite-authorized-keys"

#exec "$@"
#exec gosu git ${GOGS_PATH}/gogs web
exec su git -c "${GOGS_PATH}/gogs web"

Loading…
Cancel
Save