better prompts

This commit is contained in:
ryuuseijin 2026-08-17 23:01:01 +08:00
parent d26d2f4ccc
commit da25d78c21
3 changed files with 21 additions and 4 deletions

View file

@ -13,8 +13,9 @@ Install and authenticate the [Fly CLI](https://fly.io/docs/flyctl/install/), the
The script prompts for:
- A globally unique Fly app name
- A Fly region
- A [Fly region](https://fly.io/docs/reference/regions/)
- The initial Forgejo admin username and email
- Whether visitors must sign in before viewing Forgejo
- Whether to enable Caddy HTTP basic auth and, if enabled, its single username and password
It creates the Fly app, writes the generated `fly.toml`, stores credentials as Fly secrets, and deploys Forgejo with a 10 GB persistent volume. The Forgejo admin password is generated securely and printed before and after deployment. Save it when displayed.
@ -25,10 +26,10 @@ The app is available at `https://<appname>.fly.dev/`. Registration is disabled,
Two independent settings restrict access by default:
- Forgejo's `GITEA__service__REQUIRE_SIGNIN_VIEW` is set to `true`, so anonymous visitors cannot view Forgejo content.
- Forgejo's `GITEA__service__REQUIRE_SIGNIN_VIEW` prevents anonymous visitors from viewing Forgejo content when enabled during setup.
- Caddy basic auth is enabled when both `CADDY_BASIC_AUTH_USERNAME` and `CADDY_BASIC_AUTH_PASSWORD` are set. The setup script can configure them for you. Git HTTP endpoints and the package API remain outside Caddy authentication so Git and package clients can authenticate directly with Forgejo.
To make the instance publicly viewable, both controls must be disabled: leave the Caddy credentials unset and change `GITEA__service__REQUIRE_SIGNIN_VIEW` to `false` in the generated `fly.toml`, then run `fly deploy`.
To make the instance publicly viewable, answer no to both access-control prompts during setup. For an existing instance, leave the Caddy credentials unset, change `GITEA__service__REQUIRE_SIGNIN_VIEW` to `false` in the generated `fly.toml`, then run `fly deploy`.
To enable or change Caddy authentication later: