Sfoglia il codice sorgente

gogs: Fix entrypoint script

multi_domain
ßingen 6 anni fa
parent
commit
04b3bc511b
1 ha cambiato i file con 6 aggiunte e 1 eliminazioni
  1. +6
    -1
      images/gogs/docker-entrypoint.sh

+ 6
- 1
images/gogs/docker-entrypoint.sh Vedi 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…
Annulla
Salva