[Feature] set CustomPath with config #4819

Closed
opened 2025-11-02 06:03:44 -06:00 by GiteaMirror · 16 comments
Owner

Originally created by @6543 on GitHub (Feb 9, 2020).

if configfile is set (via ENV or --param) gitea should look at a setting CUSTOM_PATH = xy and if it exist use this as custom path

(at the moment this is only posible to set via ENV)

Originally created by @6543 on GitHub (Feb 9, 2020). if configfile is set (via ENV or --param) gitea should look at a setting `CUSTOM_PATH = xy` and if it exist use this as custom path (at the moment this is only posible to set via ENV)
GiteaMirror added the type/enhancement label 2025-11-02 06:03:44 -06:00
Author
Owner

@stale[bot] commented on GitHub (Apr 9, 2020):

This issue has been automatically marked as stale because it has not had recent activity. I am here to help clear issues left open even if solved or waiting for more insight. This issue will be closed if no further activity occurs during the next 2 weeks. If the issue is still valid just add a comment to keep it alive. Thank you for your contributions.

@stale[bot] commented on GitHub (Apr 9, 2020): This issue has been automatically marked as stale because it has not had recent activity. I am here to help clear issues left open even if solved or waiting for more insight. This issue will be closed if no further activity occurs during the next 2 weeks. If the issue is still valid just add a comment to keep it alive. Thank you for your contributions.
Author
Owner

@6543 commented on GitHub (Apr 9, 2020):

well I't looks like I have to send a pull ;)

@6543 commented on GitHub (Apr 9, 2020): well I't looks like I have to send a pull ;)
Author
Owner

@stale[bot] commented on GitHub (Jun 9, 2020):

This issue has been automatically marked as stale because it has not had recent activity. I am here to help clear issues left open even if solved or waiting for more insight. This issue will be closed if no further activity occurs during the next 2 weeks. If the issue is still valid just add a comment to keep it alive. Thank you for your contributions.

@stale[bot] commented on GitHub (Jun 9, 2020): This issue has been automatically marked as stale because it has not had recent activity. I am here to help clear issues left open even if solved or waiting for more insight. This issue will be closed if no further activity occurs during the next 2 weeks. If the issue is still valid just add a comment to keep it alive. Thank you for your contributions.
Author
Owner

@6543 commented on GitHub (Jun 11, 2020):

nop still didnt have time

@6543 commented on GitHub (Jun 11, 2020): nop still didnt have time
Author
Owner

@zeripath commented on GitHub (Jun 11, 2020):

@6543 I don't understand what you're proposing here.

@zeripath commented on GitHub (Jun 11, 2020): @6543 I don't understand what you're proposing here.
Author
Owner

@6543 commented on GitHub (Jun 11, 2020):

you cant set CustomPath by config

@6543 commented on GitHub (Jun 11, 2020): you cant set CustomPath by config
Author
Owner

@6543 commented on GitHub (Jun 11, 2020):

this is because CustomPath is determined to find ConfigFile if nothing is set
but I like to be able to do it the other way around - it would be posible if 1. moving the "DeterminCustomPath" code into its own func. 2. use a temporary customPath if configFile not specified to determin config 3. read CustomPath from config - if none use temporary customPath as CustomPath

@6543 commented on GitHub (Jun 11, 2020): this is because CustomPath is determined to find ConfigFile if nothing is set but I like to be able to do it the other way around - it would be posible if 1. moving the "DeterminCustomPath" code into its own func. 2. use a temporary customPath if configFile not specified to determin config 3. read CustomPath from config - if none use temporary customPath as CustomPath
Author
Owner

@6543 commented on GitHub (Jun 11, 2020):

@zeripath why I like to have this: I use the alpine package and had to edit the init script to be able to specify CustomPath but I would like to do it the "normal" linux way by just editing /etc/gitea/app.ini

@6543 commented on GitHub (Jun 11, 2020): @zeripath why I like to have this: I use the alpine package and had to edit the init script to be able to specify CustomPath but I would like to do it the "normal" linux way by just editing /etc/gitea/app.ini
Author
Owner

@stale[bot] commented on GitHub (Aug 16, 2020):

This issue has been automatically marked as stale because it has not had recent activity. I am here to help clear issues left open even if solved or waiting for more insight. This issue will be closed if no further activity occurs during the next 2 weeks. If the issue is still valid just add a comment to keep it alive. Thank you for your contributions.

@stale[bot] commented on GitHub (Aug 16, 2020): This issue has been automatically marked as stale because it has not had recent activity. I am here to help clear issues left open even if solved or waiting for more insight. This issue will be closed if no further activity occurs during the next 2 weeks. If the issue is still valid just add a comment to keep it alive. Thank you for your contributions.
Author
Owner

@6543 commented on GitHub (Aug 16, 2020):

👀

@6543 commented on GitHub (Aug 16, 2020): :eyes:
Author
Owner

@wxiaoguang commented on GitHub (Apr 13, 2022):

Is it still needed? I do not understand the necessary either ....

Now the docker image uses a wrapper script, there would be no custom path problem for docker users.

@wxiaoguang commented on GitHub (Apr 13, 2022): Is it still needed? I do not understand the necessary either .... Now the docker image uses a wrapper script, there would be no custom path problem for docker users.
Author
Owner

@wxiaoguang commented on GitHub (Jul 22, 2023):

Now we have "WORK_PATH" in ini, the custom-path is based on the work-path by default

So I think this problem should have been resolved.

@wxiaoguang commented on GitHub (Jul 22, 2023): Now we have "WORK_PATH" in ini, the custom-path is based on the work-path by default So I think this problem should have been resolved.
Author
Owner

@6543 commented on GitHub (Jul 22, 2023):

well it was about an installation via alpine package, and it's can also be solved by re-organizing the storage structure

@6543 commented on GitHub (Jul 22, 2023): well it was about an installation via alpine package, and it's can also be solved by re-organizing the storage structure
Author
Owner

@wxiaoguang commented on GitHub (Jul 22, 2023):

work-path is a more general path than custom-path.

Setting it in app.ini could resolve most legacy path-related problems IMO.

Or, what's the real case you would like to deal with? update: what's the work-path for the alpine package?

@wxiaoguang commented on GitHub (Jul 22, 2023): work-path is a more general path than custom-path. Setting it in app.ini could resolve most legacy path-related problems IMO. Or, what's the real case you would like to deal with? update: what's the work-path for the alpine package?
Author
Owner

@6543 commented on GitHub (Jul 22, 2023):

https://gitlab.alpinelinux.org/alpine/aports/-/blob/master/community/gitea/APKBUILD#L72

/var/lib/gitea/

@6543 commented on GitHub (Jul 22, 2023): https://gitlab.alpinelinux.org/alpine/aports/-/blob/master/community/gitea/APKBUILD#L72 `/var/lib/gitea/`
Author
Owner

@wxiaoguang commented on GitHub (Jul 22, 2023):

I see. Maybe the best approach for setting the "custom-path" is ln -s /my/custom /var/lib/gitea/custom .....

Although after the "path refactoring", adding a CUSTOM_PATH into "app.ini" is quite easy, but I guess we don't want to make the config system that complex.

@wxiaoguang commented on GitHub (Jul 22, 2023): I see. Maybe the best approach for setting the "custom-path" is `ln -s /my/custom /var/lib/gitea/custom` ..... Although after the "path refactoring", adding a CUSTOM_PATH into "app.ini" is quite easy, but I guess we don't want to make the config system that complex.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#4819