Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

path variables #3549

Closed
skimj opened this issue Feb 20, 2018 · 2 comments
Closed

path variables #3549

skimj opened this issue Feb 20, 2018 · 2 comments
Labels
issue/confirmed Issue has been reviewed and confirmed to be present or accepted to be implemented type/docs This PR mainly updates/creates documentation

Comments

@skimj
Copy link

skimj commented Feb 20, 2018

  • Gitea version (or commit ref): 1.3.2-1

I have been trying to configure my gitea server and have been thoroughly confused by all of the path settings. I started digging through the code and figured out many of the settings but soon felt like I was trying to consume a big bowl of spaghetti. Here's a table that I started to try to make sense of it all. I tried to use curly braces {} to denote variables and square brackets to indicate an app.ini value.
gitea-path-settings.csv.txt

Questions to help my own understanding:

  1. Can all of these directories be considered "cache data" such that the directory could be deleted and gitea will be able to rebuild the data (at the expense of time/performance)? Are there others that should be included?
    Repository.Local.LocalCopyPath
    Repository.Local.LocalWikiPath
    Repository.Upload.TempPath
    Indexer.IssuePath
    Indexer.RepoPath
    SessionConfig.Provider (when using "file" provider)
    StaticRootPath

  2. Architecturally, what is the difference between AppWorkPath and AppDataPath? (other than the default setting that AppDataPath is a subdirectory "data" of AppWorkPath) It seems that if there was a difference, it has been lost. For example are these defaults intentional: SessionConfig.Provider = {AppDataPath}/session vs. LogRootPath = {AppWorkPath}/log?

  3. Is there an intentional design decision to use AppDataPath in the default path but to try to prepend AppWorkPath if the app.ini setting is not an absolute path?

Ideas for changes:

  • Leave code as is and simply expand documentation
  • "Bug fixes"/minimal changes
    • Change Repository.Upload.TempPath to be consistent with Repository.Local.LocalCopyPath (AppWorkPath vs AppDataPath)
    • Expose AppWorkPath and CustomPath via app.ini (they are currently set internally or by environment variables)
  • Refactor
    • Create a single "LocalCache" path setting and remove the options for LocalCopyPath, LocalWikiPath, Indexer.IssuePath, etc. and simply make those subdirectories of LocalCache. I wonder if there is a use case which really wants control of each of those paths individually?
    • Create a function that accepts a path setting (or the app.ini key), a path expansion (to prepend if needed) and the default setting as inputs and returns the valid path. This would consolidate many instances of repeated code and would eliminate unintentional design decisions.
@stale
Copy link

stale bot commented Feb 8, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 weeks. Thank you for your contributions.

@stale stale bot added the issue/stale label Feb 8, 2019
@lunny lunny added type/docs This PR mainly updates/creates documentation issue/confirmed Issue has been reviewed and confirmed to be present or accepted to be implemented and removed issue/stale labels Feb 8, 2019
@lunny
Copy link
Member

lunny commented Aug 2, 2024

Since many path variables have been changed and most of these have been explained in https://docs.gitea.com/administration/config-cheat-sheet I will close this one.

@lunny lunny closed this as completed Aug 2, 2024
@go-gitea go-gitea locked as resolved and limited conversation to collaborators Oct 31, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
issue/confirmed Issue has been reviewed and confirmed to be present or accepted to be implemented type/docs This PR mainly updates/creates documentation
Projects
None yet
Development

No branches or pull requests

2 participants