1

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

santos82h
  • 452
  • 5
  • 15

1 Answers1

1

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/
Suraj Rao
  • 29,388
  • 11
  • 94
  • 103