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.3 kB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  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 as:
  23. * `GOOS`
  24. * `GOARCH`
  25. * `GOPATH`
  26. For `GOPATH`, check [official documentation about GOPATH environment variable](https://golang.org/cmd/go/#hdr-GOPATH_environment_variable).
  27. For others, check [official documentation about variables used when it runs the generator](https://golang.org/cmd/go/#hdr-Generate_Go_files_by_processing_source).
  28. ## Gitea files
  29. * `GITEA_WORK_DIR`: Gitea absolute path of work directory.
  30. * `GITEA_CUSTOM`: Gitea uses `GITEA_WORK_DIR`/custom folder by default. Use this variable to change *custom* directory.
  31. * `GOGS_WORK_DIR`: Deprecated, use `GITEA_WORK_DIR`
  32. * `GOGS_CUSTOM`: Deprecated, use `GITEA_CUSTOM`
  33. ## Operating system specifics
  34. * `USER`: system user that launch Gitea. Useful for repository URL address on Gitea interface
  35. * `USERNAME`: if no USER found, Gitea will try `USERNAME`
  36. * `HOME`: User home directory path (**except if** you're running on Windows, check the following `USERPROFILE` variable)
  37. ### Only on Windows
  38. * `USERPROFILE`: User home directory path. If empty, uses `HOMEDRIVE` + `HOMEPATH`
  39. * `HOMEDRIVE`: Main drive path you will use to get home directory
  40. * `HOMEPATH`: Home relative path in the given home drive path
  41. ## Macaron (framework used by Gitea)
  42. * `HOST`: Host Macaron will listen on
  43. * `PORT`: Port Macaron will listen on
  44. * `MACARON_ENV`: global variable to provide special functionality for development environments vs production environments. If MACARON_ENV is set to "" or "development" then templates will be recompiled on every request. For more performance, set the MACARON_ENV environment variable to "production".
  45. ## Miscellaneous
  46. * `SKIP_MINWINSVC`: Do not run as a service on Windows if set to 1
  47. * `ZOOKEEPER_PATH`: [Zookeeper](http://zookeeper.apache.org/) jar file path