Doc updates for customization and installation. (#6176)

* Doc updates and changing default sqlite DB path

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* Update customizing locales and THEMES

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* Add link to templates directory

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* Add portion for final step of running Gitea

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* Add recommended to service file usage

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* Removed DB path change, moving to another PR
Updated doc sentence structure

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* Revert change to template wording

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* Move recommended run-type to top
This commit is contained in:
John Olheiser 2019-02-28 06:09:47 -06:00 committed by Lunny Xiao
parent 1cf3fc3bc5
commit 4b7237b63e
2 changed files with 62 additions and 6 deletions

View file

@ -44,6 +44,9 @@ location. When launched manually, Gitea can be killed using `Ctrl+C`.
## Recommended server configuration
**NOTE:** Many of the following directories can be configured using [Environment Variables]({{< relref "doc/advanced/specific-variables.en-us.md" >}}) as well!
Of note, configuring `GITEA_WORK_DIR` will tell Gitea where to base its working directory, as well as ease installation.
### Prepare environment
Check that git is installed on the server, if it is not install it first.
@ -66,9 +69,9 @@ adduser \
### Create required directory structure
```sh
mkdir -p /var/lib/gitea/{custom,data,indexers,public,log}
chown git:git /var/lib/gitea/{data,indexers,log}
chmod 750 /var/lib/gitea/{data,indexers,log}
mkdir -p /var/lib/gitea/{custom,data,log}
chown -R git:git /var/lib/gitea/
chmod -R 750 /var/lib/gitea/
mkdir /etc/gitea
chown root:git /etc/gitea
chmod 770 /etc/gitea
@ -80,16 +83,33 @@ chmod 750 /etc/gitea
chmod 644 /etc/gitea/app.ini
```
### Configure Gitea's working directory
**NOTE:** If you plan on running Gitea as a Linux service, you can skip this step as the service file allows you to set `WorkingDirectory`. Otherwise, consider setting this environment variable (semi-)permanently so that Gitea consistently uses the correct working directory.
```
export GITEA_WORK_DIR=/var/lib/gitea/
```
### Copy gitea binary to global location
```
cp gitea /usr/local/bin/gitea
```
### Create service file to start gitea automatically
## Running Gitea
After the above steps, two options to run Gitea are:
### 1. Creating a service file to start Gitea automatically (recommended)
See how to create [Linux service]({{< relref "run-as-service-in-ubuntu.en-us.md" >}})
### 2. Running from command-line/terminal
```
GITEA_WORK_DIR=/var/lib/gitea/ /usr/local/bin/gitea web -c /etc/gitea/app.ini
```
## Updating to a new version
You can update to a new version of gitea by stopping gitea, replacing the binary at `/usr/local/bin/gitea` and restarting the instance.