Adding a setting to control the Gitea custom directory #655

Closed
opened 2024-05-15 07:46:01 +00:00 by tobiasbp · 3 comments
tobiasbp commented 2024-05-15 07:46:01 +00:00 (Migrated from gitea.com)

I'm considering ways to deploy Gitea with changes in the custom directory. Changes include logos, templates & themes. I'd like to do it with a Docker images based on the Gitea image with the only change being that my customizations would be stored in /var/lib/gitea/custom.

To be able to use that directory as the custom dir, I would need to set the env variable GITEA_CUSTOM, however that variable is hardcoded to be /data/gitea in the chart to be /data/gitea, where /data is where all the Gitea data is stored.

I would like to make that path configurable in the chart. What do you think of that idea? Would a PR for that be accepted?

I realize I could also set the STATIC_URL_PREFIX in the Server section, to point to themes etc. not hosted by the Gitea server itself, but I would not be able to deploy template files this way.

I'm considering ways to deploy Gitea with changes in the _custom_ directory. Changes include _logos_, _templates_ & _themes_. I'd like to do it with a Docker images based on the Gitea image with the only change being that my customizations would be stored in _/var/lib/gitea/custom_. To be able to use that directory as the custom dir, I would need to set the _env_ variable _GITEA_CUSTOM_, however that variable is [hardcoded to be _/data/gitea_ in the chart](https://gitea.com/gitea/helm-chart/src/commit/4d62136a3d2c67b132c72eb2abeb189b10707c8d/templates/gitea/deployment.yaml#L68) to be _/data/gitea_, where _/data_ is where all the Gitea data is stored. I would like to make that path configurable in the chart. What do you think of that idea? Would a PR for that be accepted? I realize I could also set the _STATIC_URL_PREFIX_ in the [Server section](https://docs.gitea.com/administration/config-cheat-sheet#server-server), to point to _themes_ etc. not hosted by the Gitea server itself, but I would not be able to deploy _template_ files this way.
tobiasbp commented 2024-05-27 08:54:20 +00:00 (Migrated from gitea.com)

No thoughts on this from anyone?

No thoughts on this from anyone?
justusbunsi commented 2024-05-27 14:19:49 +00:00 (Migrated from gitea.com)

Hi. Sorry, this issue slipped through. There are lots of hard-coded /data/... directory references across this Helm Chart code base. The intention to always use /data/ as base path is having an identical interface when using rootful Gitea image or the rootless one and not worry about that difference. In the past, there were an issue regarding that change for the rootless image (#396). But that was fixed.

I would like to make that path configurable in the chart. What do you think of that idea? Would a PR for that be accepted?

Right now, only making the GITEA_CUSTOM path configurable would increase the risk of erroneous Chart configuration. You'd also have to consider the remaining references of /data/... in the code base. I currently don't see a benefit of making this configurable.

Efforts have already been made to add Gitea template support to the Chart (#235 which was closed unmerged). If you have feel comfortable with it, you could go ahead and revive that PR. 🙂 That would be the most valuable addition and would lay the foundation for the customizations.

Hi. Sorry, this issue slipped through. There are lots of hard-coded `/data/...` directory references across this Helm Chart code base. The intention to always use `/data/` as base path is having an identical interface when using rootful Gitea image or the rootless one and not worry about that difference. In the past, there were an issue regarding that change for the rootless image (#396). But that was fixed. > I would like to make that path configurable in the chart. What do you think of that idea? Would a PR for that be accepted? Right now, only making the `GITEA_CUSTOM` path configurable would increase the risk of erroneous Chart configuration. You'd also have to consider the remaining references of `/data/...` in the code base. I currently don't see a benefit of making this configurable. Efforts have already been made to add Gitea template support to the Chart (#235 which was closed unmerged). If you have feel comfortable with it, you could go ahead and revive that PR. 🙂 That would be the most valuable addition and would lay the foundation for the customizations.
tobiasbp commented 2024-06-04 12:18:02 +00:00 (Migrated from gitea.com)

I'll take a look at your links. Thanks.

I'll take a look at your links. Thanks.
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: lunny/helm-chart#655
No description provided.