You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
make gitea healthcheck work when configured for https
When HTTPS was enabled, the healthcheck script failed for a number of
reasons, not the least of which were `curl` needing to be provided with
the path to the container's self-signed certificate and problems
associated with using "localhost" rather than the container name.
In theory, `gitea cert` will generate for `--host gitea,localhost` and
those do turn up in the certificate. But `curl` doesn't seem to like it.
Rather than try to figure out why `curl` gets upset, it's easier to just
use "hostname" syntax in the healthcheck URL. In other words:
```
https://gitea:3000
```
rather than:
```
https://localhost:3000
```
Although it isn't strictly necessary for HTTP, I used "hostname"
syntax for that URL too, for consistency.
Unlike `localhost`, "hostname" syntax also steers clear of IPv6 `::1`.
Documentation updated to include instructions for swapping the
healthcheck URLs when enabling HTTPS.
Signed-off-by: Phill Kelley <[email protected]>
@@ -149,7 +160,14 @@ Environment variables need to be set in several stages:
149
160
150
161
Notes:
151
162
152
-
* The certificate has a one-year lifetime. It can be regenerated at any time by re-running the command provided earlier.
163
+
* The certificate has a one-year lifetime. It can be regenerated at any time by re-running the command provided earlier. You could, for example, embed it in a `cron` job, like this:
In words, run the command "at five minutes after midnight on the first of January and the first of July".
170
+
153
171
* Gitea also supports LetsEncrypt. See [using ACME with Let's Encrypt](https://docs.gitea.com/administration/https-setup#using-acme-default-lets-encrypt).
0 commit comments