设置 gitea 初始配置

发布于 2025-01-14 16:21:24 字数 447 浏览 1 评论 0原文

当我像这样使用 docker 安装 gitea 时 https://docs.gitea.io /en-us/install-with-docker/ 总是我必须访问 http://localhost:3000/install 并单击“安装 gitea”才能真正完成安装。

之后我必须访问 http://localhost:3000/user/sign_up 并注册一个用户。

有什么办法可以通过命令行而不是手动进行吗?

我正在寻找的是一个脚本,该脚本可以在 docker 中运行干净的 gitea 安装,准备启动,而无需填写 http://localhost:3000/install 和 http://localhost:3000/user/sign_up

When I install gitea with docker like that https://docs.gitea.io/en-us/install-with-docker/ always I have to visit http://localhost:3000/install and click "Install gitea" to really finish installation.

After that I have to visit http://localhost:3000/user/sign_up and register a user.

Is there any way to make it by command line instead of manually?

What I looking for is a script that run a clean gitea installation in docker ready to start without have to fill http://localhost:3000/install and http://localhost:3000/user/sign_up

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

戒ㄋ 2025-01-21 16:21:24

你可以像这样发出一个curl请求:

curl -H "Content-type: application/x-www-form-urlencoded" -d "db_type=postgres" -d "db_host={host}" -d "db_user={user}" -d "db_passwd={pass}" -d "db_name=gitea" -d "ssl_mode=disable" -d "db_schema=" -d "charset=utf8" -d "db_path=%2Fdata%2Fgitea%2Fgitea.db" -d "app_name={title}" -d "repo_root_path=%2Fdata%2Fgit%2Frepositories" -d "lfs_root_path=%2Fdata%2Fgit%2Flfs" -d "run_user=git" -d "domain={domain}" -d "ssh_port=22" -d "http_port=3000" -d "app_url={appURL}" -d "log_root_path=%2Fdata%2Fgitea%2Flog" -d "smtp_addr=" -d "smtp_port=" -d "smtp_from=" -d "smtp_user=" -d "smtp_passwd=" -d "enable_federated_avatar=on" -d "enable_open_id_sign_in=on" -d "enable_open_id_sign_up=on" -d "enable_captcha=on" -d "require_sign_in_view=on" -d "default_allow_create_organization=on" -d "default_enable_timetracking=on" -d "no_reply_address=noreply.localhost" -d "password_algorithm=pbkdf2" -d "admin_name={username}" -d "admin_passwd={password}" -d "admin_confirm_passwd={password}" -d "admin_email={email}" -X POST  http://localhost:3000/

you can make a curl request like this:

curl -H "Content-type: application/x-www-form-urlencoded" -d "db_type=postgres" -d "db_host={host}" -d "db_user={user}" -d "db_passwd={pass}" -d "db_name=gitea" -d "ssl_mode=disable" -d "db_schema=" -d "charset=utf8" -d "db_path=%2Fdata%2Fgitea%2Fgitea.db" -d "app_name={title}" -d "repo_root_path=%2Fdata%2Fgit%2Frepositories" -d "lfs_root_path=%2Fdata%2Fgit%2Flfs" -d "run_user=git" -d "domain={domain}" -d "ssh_port=22" -d "http_port=3000" -d "app_url={appURL}" -d "log_root_path=%2Fdata%2Fgitea%2Flog" -d "smtp_addr=" -d "smtp_port=" -d "smtp_from=" -d "smtp_user=" -d "smtp_passwd=" -d "enable_federated_avatar=on" -d "enable_open_id_sign_in=on" -d "enable_open_id_sign_up=on" -d "enable_captcha=on" -d "require_sign_in_view=on" -d "default_allow_create_organization=on" -d "default_enable_timetracking=on" -d "no_reply_address=noreply.localhost" -d "password_algorithm=pbkdf2" -d "admin_name={username}" -d "admin_passwd={password}" -d "admin_confirm_passwd={password}" -d "admin_email={email}" -X POST  http://localhost:3000/
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文