瀏覽代碼

gogs: Fix entrypoint script

multi_domain
ßingen 6 年之前
父節點
當前提交
04b3bc511b
共有 1 個檔案被更改,包括 6 行新增1 行删除
  1. +6
    -1
      images/gogs/docker-entrypoint.sh

+ 6
- 1
images/gogs/docker-entrypoint.sh 查看文件

@@ -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…
取消
儲存