Add gitea configuration
This commit is contained in:
parent
336b693ef2
commit
d012f5ab52
2 changed files with 116 additions and 0 deletions
10
content/docs/server/services/_index.md
Normal file
10
content/docs/server/services/_index.md
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
---
|
||||||
|
title: "Services"
|
||||||
|
weight: 1
|
||||||
|
bookFlatSection: true
|
||||||
|
# bookToc: true
|
||||||
|
# bookHidden: false
|
||||||
|
# bookCollapseSection: false
|
||||||
|
# bookComments: false
|
||||||
|
# bookSearchExclude: false
|
||||||
|
---
|
106
content/docs/server/services/gitea.md
Normal file
106
content/docs/server/services/gitea.md
Normal file
|
@ -0,0 +1,106 @@
|
||||||
|
---
|
||||||
|
title: "Gitea"
|
||||||
|
weight: 1
|
||||||
|
# bookFlatSection: false
|
||||||
|
# bookToc: true
|
||||||
|
# bookHidden: false
|
||||||
|
# bookCollapseSection: false
|
||||||
|
# bookComments: false
|
||||||
|
# bookSearchExclude: false
|
||||||
|
---
|
||||||
|
|
||||||
|
# Gitea
|
||||||
|
|
||||||
|
## Installation
|
||||||
|
Install `gitea` package.
|
||||||
|
|
||||||
|
## Configuration
|
||||||
|
Configuration takes place in `/etc/gitea/app.ini`. Examples are provided at
|
||||||
|
`/etc/gitea/app.example.ini`.
|
||||||
|
|
||||||
|
### Server
|
||||||
|
Server configuration.
|
||||||
|
```
|
||||||
|
[server]
|
||||||
|
PROTOCOL = unix
|
||||||
|
DOMAIN = git.edgarpierre.fr
|
||||||
|
ROOT_URL = https://git.edgarpierre.fr/
|
||||||
|
STATIC_URL_PREFIX =
|
||||||
|
HTTP_ADDR = /run/gitea/gitea.socket
|
||||||
|
SSH_PORT = ***
|
||||||
|
OFFLINE_MODE = true
|
||||||
|
ENABLE_GZIP = true
|
||||||
|
ALLOW_GRACEFUL_RESTARTS = true
|
||||||
|
```
|
||||||
|
|
||||||
|
#### LFS
|
||||||
|
```
|
||||||
|
LFS_START_SERVER = true
|
||||||
|
LFS_JWT_SECRET =
|
||||||
|
```
|
||||||
|
|
||||||
|
### Database
|
||||||
|
Create user and database for `gitea` using postgres.
|
||||||
|
|
||||||
|
To use a unix socket connection to postgres, configuration should be :
|
||||||
|
```
|
||||||
|
[database]
|
||||||
|
DB_TYPE = postgres
|
||||||
|
HOST = /run/postgresql/
|
||||||
|
NAME = gitea
|
||||||
|
USER = gitea
|
||||||
|
```
|
||||||
|
|
||||||
|
### Security
|
||||||
|
```
|
||||||
|
[security]
|
||||||
|
INSTALL_LOCK = true
|
||||||
|
SECRET_KEY = ***
|
||||||
|
INTERNAL_TOKEN = ***
|
||||||
|
REVERSE_PROXY_TRUSTED_PROXIES = 127.0.0.0/8,::1/128
|
||||||
|
```
|
||||||
|
|
||||||
|
```
|
||||||
|
[oauth2]
|
||||||
|
ENABLE = false
|
||||||
|
```
|
||||||
|
|
||||||
|
```
|
||||||
|
[service]
|
||||||
|
DISABLE_REGISTRATION = true
|
||||||
|
```
|
||||||
|
|
||||||
|
### Logs
|
||||||
|
```
|
||||||
|
[log]
|
||||||
|
ROOT_PATH = /var/log/gitea
|
||||||
|
```
|
||||||
|
|
||||||
|
### Repositories
|
||||||
|
```
|
||||||
|
[repository]
|
||||||
|
ROOT = /var/lib/gitea/repos
|
||||||
|
DEFAULT_BRANCH = main
|
||||||
|
```
|
||||||
|
|
||||||
|
### Email
|
||||||
|
```
|
||||||
|
[mailer]
|
||||||
|
ENABLED = true
|
||||||
|
SUBJECT_PREFIX = [Gitea]
|
||||||
|
HOST = edgarpierre.fr:465
|
||||||
|
FROM = gitea@edgarpierre.fr
|
||||||
|
USER = gitea
|
||||||
|
PASSWD = ***
|
||||||
|
SEND_AS_PLAIN_TEXT = true
|
||||||
|
MAILER_TYPE = smtp
|
||||||
|
```
|
||||||
|
|
||||||
|
### Webhooks
|
||||||
|
```
|
||||||
|
[webhook]
|
||||||
|
ALLOWED_HOST_LIST = loopback,edgarpierre.fr,*.edgarpierre.fr
|
||||||
|
```
|
||||||
|
|
||||||
|
## Service
|
||||||
|
Gitea is started using systemd service `gitea.service`.
|
Loading…
Reference in a new issue