You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

specific-variables.en-us.md 2.2 kB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. ---
  2. date: "2017-04-08T11:34:00+02:00"
  3. title: "Specific variables"
  4. slug: "specific-variables"
  5. weight: 20
  6. toc: false
  7. draft: false
  8. menu:
  9. sidebar:
  10. parent: "advanced"
  11. name: "Specific variables"
  12. weight: 20
  13. identifier: "specific-variables"
  14. ---
  15. # Specific variables
  16. This is an inventory of Gitea environment variables. They change Gitea behaviour.
  17. Initialize them before Gitea command to be effective, for example:
  18. ```
  19. GITEA_CUSTOM=/home/gitea/custom ./gitea web
  20. ```
  21. ## From Go language
  22. As Gitea is written in Go, it uses some Go variables, such as:
  23. * `GOOS`
  24. * `GOARCH`
  25. * [`GOPATH`](https://golang.org/cmd/go/#hdr-GOPATH_environment_variable)
  26. For documentation about each of the variables available, refer to the
  27. [official Go documentation](https://golang.org/cmd/go/#hdr-Environment_variables).
  28. ## Gitea files
  29. * `GITEA_WORK_DIR`: Absolute path of working directory.
  30. * `GITEA_CUSTOM`: Gitea uses `GITEA_WORK_DIR`/custom folder by default. Use this variable
  31. to change *custom* directory.
  32. * `GOGS_WORK_DIR`: Deprecated, use `GITEA_WORK_DIR`
  33. * `GOGS_CUSTOM`: Deprecated, use `GITEA_CUSTOM`
  34. ## Operating system specifics
  35. * `USER`: System user that Gitea will run as. Used for some repository access strings.
  36. * `USERNAME`: if no `USER` found, Gitea will use `USERNAME`
  37. * `HOME`: User home directory path. The `USERPROFILE` environment variable is used in Windows.
  38. ### Only on Windows
  39. * `USERPROFILE`: User home directory path. If empty, uses `HOMEDRIVE` + `HOMEPATH`
  40. * `HOMEDRIVE`: Main drive path used to access the home directory (C:)
  41. * `HOMEPATH`: Home relative path in the given home drive path
  42. ## Macaron (framework used by Gitea)
  43. * `HOST`: Host Macaron will listen on
  44. * `PORT`: Port Macaron will listen on
  45. * `MACARON_ENV`: global variable to provide special functionality for development environments
  46. vs. production environments. If MACARON_ENV is set to "" or "development", then templates will
  47. be recompiled on every request. For more performance, set the MACARON_ENV environment variable
  48. to "production".
  49. ## Miscellaneous
  50. * `SKIP_MINWINSVC`: If set to 1, do not run as a service on Windows.