You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: custom/conf/app.example.ini
+8-8Lines changed: 8 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -16,26 +16,23 @@
16
16
;;
17
17
;; - _`AppPath`_: This is the absolute path of the running gitea binary.
18
18
;; - _`AppWorkPath`_: This refers to "working path" of the `gitea` binary. It is determined by using the first set thing in the following hierarchy:
19
+
;; - The "WORK_PATH" option in "app.ini" file
19
20
;; - The `--work-path` flag passed to the binary
20
21
;; - The environment variable `$GITEA_WORK_DIR`
21
22
;; - A built-in value set at build time (see building from source)
22
23
;; - Otherwise it defaults to the directory of the _`AppPath`_
23
-
;; - If any of the above are relative paths then they are made absolute against
24
-
;; the directory of the _`AppPath`_
25
-
;; - _`CustomPath`_: This is the base directory for custom templates and other options.
26
-
;; It is determined by using the first set thing in the following hierarchy:
24
+
;; - If any of the above are relative paths then they are made absolute against the directory of the _`AppPath`_
25
+
;; - _`CustomPath`_: This is the base directory for custom templates and other options. It is determined by using the first set thing in the following hierarchy:
27
26
;; - The `--custom-path` flag passed to the binary
28
27
;; - The environment variable `$GITEA_CUSTOM`
29
28
;; - A built-in value set at build time (see building from source)
30
29
;; - Otherwise it defaults to _`AppWorkPath`_`/custom`
31
-
;; - If any of the above are relative paths then they are made absolute against the
32
-
;; the directory of the _`AppWorkPath`_
30
+
;; - If any of the above are relative paths then they are made absolute against the directory of the _`AppWorkPath`_
33
31
;; - _`CustomConf`_: This is the path to the `app.ini` file.
34
32
;; - The `--config` flag passed to the binary
35
33
;; - A built-in value set at build time (see building from source)
36
34
;; - Otherwise it defaults to _`CustomPath`_`/conf/app.ini`
37
-
;; - If any of the above are relative paths then they are made absolute against the
38
-
;; the directory of the _`CustomPath`_
35
+
;; - If any of the above are relative paths then they are made absolute against the directory of the _`CustomPath`_
39
36
;;
40
37
;; In addition there is _`StaticRootPath`_ which can be set as a built-in at build time, but will otherwise default to _`AppWorkPath`_
41
38
@@ -52,6 +49,9 @@ RUN_USER = ; git
52
49
;; Application run mode, affects performance and debugging: "dev" or "prod", default is "prod"
53
50
;; Mode "dev" makes Gitea easier to develop and debug, values other than "dev" are treated as "prod" which is for production use.
54
51
;RUN_MODE = prod
52
+
;;
53
+
;; The working directory, see the comment of AppWorkPath above
Copy file name to clipboardExpand all lines: docs/content/doc/administration/backup-and-restore.en-us.md
+2-12Lines changed: 2 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -46,9 +46,9 @@ directory. There should be some output similar to the following:
46
46
47
47
Inside the `gitea-dump-1482906742.zip` file, will be the following:
48
48
49
-
-`app.ini` - Optional copy of configuration file if originally stored outside of the default `custom/` directory
49
+
-`app.ini` - Optional copy of configuration file if originally stored outside the default `custom/` directory
50
50
-`custom` - All config or customization files in `custom/`.
51
-
-`data` - Data directory in <GITEA_WORK_DIR>, except sessions if you are using file session. This directory includes `attachments`, `avatars`, `lfs`, `indexers`, SQLite file if you are using SQLite.
51
+
-`data` - Data directory (APP_DATA_PATH), except sessions if you are using file session. This directory includes `attachments`, `avatars`, `lfs`, `indexers`, SQLite file if you are using SQLite.
52
52
-`gitea-db.sql` - SQL dump of database
53
53
-`gitea-repo.zip` - Complete copy of the repository directory.
54
54
-`log/` - Various logs. They are not needed for a recovery or migration.
@@ -139,16 +139,6 @@ chown -R git:git /data
139
139
140
140
The default user in the gitea container is `git` (1000:1000). Please replace `2a83b293548e` with your gitea container id or name.
141
141
142
-
These are the default paths used in the container:
143
-
144
-
```text
145
-
DEFAULT CONFIGURATION:
146
-
CustomPath: /data/gitea (GITEA_CUSTOM)
147
-
CustomConf: /data/gitea/conf/app.ini
148
-
AppPath: /usr/local/bin/gitea
149
-
AppWorkPath: /usr/local/bin
150
-
```
151
-
152
142
### Using Docker-rootless (`restore`)
153
143
154
144
The restore workflow in Docker-rootless containers differs only in the directories to be used:
Copy file name to clipboardExpand all lines: docs/content/doc/administration/config-cheat-sheet.en-us.md
+8-8Lines changed: 8 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -44,28 +44,27 @@ reported as part of the default configuration when running `gitea --help` or on
44
44
45
45
-_`AppPath`_: This is the absolute path of the running gitea binary.
46
46
-_`AppWorkPath`_: This refers to "working path" of the `gitea` binary. It is determined by using the first set thing in the following hierarchy:
47
+
- The `WORK_PATH` option in `app.ini`
47
48
- The `--work-path` flag passed to the binary
48
49
- The environment variable `$GITEA_WORK_DIR`
49
50
- A built-in value set at build time (see building from source)
50
-
- Otherwise it defaults to the directory of the _`AppPath`_
51
-
- If any of the above are relative paths then they are made absolute against
52
-
the directory of the _`AppPath`_
51
+
- Otherwise, it defaults to the directory of the _`AppPath`_
52
+
- If any of the above are relative paths then they are made absolute against the directory of the _`AppPath`_
53
53
-_`CustomPath`_: This is the base directory for custom templates and other options.
54
54
It is determined by using the first set thing in the following hierarchy:
55
55
- The `--custom-path` flag passed to the binary
56
56
- The environment variable `$GITEA_CUSTOM`
57
57
- A built-in value set at build time (see building from source)
58
-
- Otherwise it defaults to _`AppWorkPath`_`/custom`
58
+
- Otherwise, it defaults to _`AppWorkPath`_`/custom`
59
59
- If any of the above are relative paths then they are made absolute against the
60
60
the directory of the _`AppWorkPath`_
61
61
-_`CustomConf`_: This is the path to the `app.ini` file.
62
62
- The `--config` flag passed to the binary
63
63
- A built-in value set at build time (see building from source)
64
-
- Otherwise it defaults to _`CustomPath`_`/conf/app.ini`
65
-
- If any of the above are relative paths then they are made absolute against the
66
-
the directory of the _`CustomPath`_
64
+
- Otherwise, it defaults to _`CustomPath`_`/conf/app.ini`
65
+
- If any of the above are relative paths then they are made absolute against the directory of the _`CustomPath`_
67
66
68
-
In addition there is _`StaticRootPath`_ which can be set as a built-in at build time, but will otherwise default to _`AppWorkPath`_
67
+
In addition, there is _`StaticRootPath`_ which can be set as a built-in at build time, but will otherwise default to _`AppWorkPath`_
69
68
70
69
## Overall (`DEFAULT`)
71
70
@@ -74,6 +73,7 @@ In addition there is _`StaticRootPath`_ which can be set as a built-in at build
74
73
This should be a dedicated system (non-user) account. Setting this incorrectly will cause Gitea
75
74
to not start.
76
75
-`RUN_MODE`: **prod**: Application run mode, affects performance and debugging: `dev` or `prod`, default is `prod`. Mode `dev` makes Gitea easier to develop and debug, values other than `dev` are treated as `prod` which is for production use.
76
+
-`WORK_PATH`: **_the-work-path_**: The working directory, see the comment of AppWorkPath above.
- Else the directory that contains the Gitea binary
66
-
-`%(APP_DATA_PATH)` (default for database, indexers, etc.)
67
+
-`AppDataPath` (default for database, indexers, etc.)
67
68
-`APP_DATA_PATH` from `app.ini`
68
69
- Else _`AppWorkPath`_`/data`
69
70
-_`CustomPath`_ (custom templates)
@@ -112,9 +113,6 @@ Gitea's custom templates must be added to the correct location or Gitea will not
112
113
The correct path for the template(s) will be relative to the `CustomPath`
113
114
114
115
1. To find `CustomPath`, look for Custom File Root Path in Site Administration -> Configuration
115
-
116
-
If that doesn't exist, you can try `echo $GITEA_CUSTOM`
117
-
118
116
2. If you are still unable to find a path, the default can be [calculated above](#where-does-gitea-store-what-file)
119
117
3. Once you have figured out the correct custom path, you can refer to the [customizing Gitea]({{< relref "doc/administration/customizing-gitea.en-us.md" >}}) page to add your template to the correct location.
0 commit comments