Skip to content
This repository was archived by the owner on Dec 2, 2017. It is now read-only.

Commit 7ee0103

Browse files
blankoworldappleboy
authored andcommitted
Add GITEA_CUSTOM configuration in customization section (#111)
* Add GITEA_CUSTOM configuration in customization section * Add new section about Gitea specific environment variables * Revert "Add GITEA_CUSTOM configuration in customization section" This reverts commit b077702.
1 parent 67a08b0 commit 7ee0103

File tree

1 file changed

+67
-0
lines changed

1 file changed

+67
-0
lines changed
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
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+
16+
# Specific variables
17+
18+
This is an inventory of Gitea environment variables. They change Gitea behaviour.
19+
20+
Initialize them before Gitea command to be effective, for example:
21+
22+
```
23+
GITEA_CUSTOM=/home/gitea/custom ./gitea web
24+
```
25+
26+
## From Go language
27+
28+
As Gitea is written in Go, it uses some Go variables as:
29+
30+
* `GOOS`
31+
* `GOARCH`
32+
* `GOPATH`
33+
34+
For `GOPATH`, check [official documentation about GOPATH environment variable](https://golang.org/cmd/go/#hdr-GOPATH_environment_variable).
35+
36+
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).
37+
38+
## Gitea files
39+
40+
* `GITEA_WORK_DIR`: Gitea absolute path of work directory.
41+
* `GITEA_CUSTOM`: Gitea uses `GITEA_WORK_DIR`/custom folder by default. Use this variable to change *custom* directory.
42+
* `GOGS_WORK_DIR`: Deprecated, use `GITEA_WORK_DIR`
43+
* `GOGS_CUSTOM`: Deprecated, use `GITEA_CUSTOM`
44+
45+
## Operating system specifics
46+
47+
* `USER`: system user that launch Gitea. Useful for repository URL address on Gitea interface
48+
* `USERNAME`: if no USER found, Gitea will try `USERNAME`
49+
* `HOME`: User home directory path (**except if** you're running on Windows, check the following `USERPROFILE` variable)
50+
51+
### Only on Windows
52+
53+
* `USERPROFILE`: User home directory path. If empty, uses `HOMEDRIVE` + `HOMEPATH`
54+
* `HOMEDRIVE`: Main drive path you will use to get home directory
55+
* `HOMEPATH`: Home relative path in the given home drive path
56+
57+
## Macaron (framework used by Gitea)
58+
59+
* `HOST`: Host Macaron will listen on
60+
* `PORT`: Port Macaron will listen on
61+
* `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".
62+
63+
## Miscellaneous
64+
65+
* `SKIP_MINWINSVC`: Do not run as a service on Windows if set to 1
66+
* `ZOOKEEPER_PATH`: [Zookeeper](http://zookeeper.apache.org/) jar file path
67+

0 commit comments

Comments
 (0)