Skip to content

2025-04-24 gitea - master branch - PR 1 of 2#798

Merged
Slyke merged 8 commits intoSensorsIot:masterfrom
Paraphraser:20250424-gitea-master
May 18, 2025
Merged

2025-04-24 gitea - master branch - PR 1 of 2#798
Slyke merged 8 commits intoSensorsIot:masterfrom
Paraphraser:20250424-gitea-master

Conversation

@Paraphraser
Copy link

  1. Updates to image which is being actively maintained.

  2. Adopts environment variable conventions of new image.

  3. Uses custom MariaDB instance as back-end.

  4. Removes /etc/timezone mapping (without replacing with TZ) because new image is built without tzdata.

  5. Adds basic documentation.

1. Updates to image which is being actively maintained.

2. Adopts environment variable conventions of new image.

3. Uses custom MariaDB instance as back-end.

4. Removes `/etc/timezone` mapping (without replacing with `TZ`)
   because new image is built without `tzdata`.

5. Adds basic documentation.

Signed-off-by: Phill Kelley <34226495+Paraphraser@users.noreply.github.com>
Adds environment vars to support HTTPS.

Adds documentation:

* enabling HTTPS
* migrating existing repositories

Signed-off-by: Phill Kelley <34226495+Paraphraser@users.noreply.github.com>
Signed-off-by: Phill Kelley <34226495+Paraphraser@users.noreply.github.com>
Signed-off-by: Phill Kelley <34226495+Paraphraser@users.noreply.github.com>
Copy link

@Noschvie Noschvie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGMT

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 <34226495+Paraphraser@users.noreply.github.com>
Using the [`CMD-SHELL`](https://docs.docker.com/reference/compose-file/services/#healthcheck)
form of the `healthcheck` test allows for passing the variable **name**
`GITEA__server__CERT_FILE` to the check.

The `$$` prefix stops docker compose from trying to substitute the
variable name at "up" time. The variable will be substituted at run
time, which means it will take on the **value** of that variable as
specified in the `environment` clause in the service definition.

This approach will automatically keep the health check in sync with the
value of the environment variable (ie reducing the likelihood of any
mismatch if the user "gets creative" with certificate generation).

Signed-off-by: Phill Kelley <34226495+Paraphraser@users.noreply.github.com>
Signed-off-by: Phill Kelley <34226495+Paraphraser@users.noreply.github.com>
Signed-off-by: Phill <34226495+Paraphraser@users.noreply.github.com>
@Slyke Slyke merged commit 4dacdf1 into SensorsIot:master May 18, 2025
@Paraphraser Paraphraser deleted the 20250424-gitea-master branch May 18, 2025 03:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants