git.berlin/README.md

73 lines
1.8 KiB
Markdown
Raw Permalink Normal View History

2018-12-07 16:37:28 +01:00
<img src="https://git.berlin/m/git.berlin/raw/branch/master/assets/logo-gitberlin.png" height="100">
2018-12-04 02:38:55 +01:00
# git.berlin
2016-04-24 22:31:44 +02:00
2018-12-07 16:37:28 +01:00
> Gitea installation notes [git.berlin](https://git.berlin)
- [Migration from GitLab](#migration-from-gitlab)
2018-12-15 19:43:29 +01:00
- [Update Gitea](#update-gitea)
2018-12-07 16:37:28 +01:00
- [Customization](#customization)
- [Handy commands](#handy-commands)
- [Gitea Documentation](#gitea-documentation)
---
## Migration from GitLab
2018-12-15 19:43:29 +01:00
- [`bin/migrate-gitlab-gitea.sh`](bin/migrate-gitlab-gitea.sh)
## Update Gitea
2018-12-15 20:55:04 +01:00
```bash
2020-03-13 17:32:23 +01:00
# run update script, passing version number as option
./bin/update-gitea.sh 1.6.1
2018-12-15 20:55:04 +01:00
```
2018-12-15 19:43:29 +01:00
Update script sets options by default, can be changed at top of script:
2018-12-15 20:11:23 +01:00
| Option | Default | Description |
| ------------- | ------------- | ------------- |
| `giteaBinary` | `/home/git/gitea/gitea` | Gitea binary path |
| `arch` | `linux-amd64` | Server architecture |
| `giteaStore` | `/home/git/gitea-update` | Directory where update files will be stored |
| `giteaUser` | `git` | linux user Gitea is running under |
| `giteaGroup` | `git` | linux group Gitea is running under |
2018-12-15 19:43:29 +01:00
2018-12-15 20:55:04 +01:00
- [`bin/update-gitea.sh`](bin/update-gitea.sh)
2018-12-07 16:37:28 +01:00
## Customization
2016-04-02 15:33:36 +02:00
2018-12-07 16:37:28 +01:00
The `custom/` folder maps to `/home/git/gitea/custom/` on the server. Its contents can be deployed via rsync with:
```bash
npm i
2024-02-02 16:12:46 +01:00
npm run deploy
2018-12-07 16:37:28 +01:00
```
[Gitea Docs: Customizing Gitea](https://docs.gitea.io/en-us/customizing-gitea/)
2016-04-02 15:33:36 +02:00
## Handy commands
```bash
2018-12-04 02:31:39 +01:00
sudo su git
cd /home/git
2016-04-02 15:33:36 +02:00
2018-12-04 02:31:39 +01:00
vi gitea/custom/conf/app.ini
2018-12-07 19:03:39 +01:00
# Backup
# https://docs.gitea.io/en-us/backup-and-restore/
sudo su git
./gitea dump -c gitea/custom/conf/app.ini
# Restart Gitea service
2018-12-15 19:38:23 +01:00
sudo service gitea restart
2018-12-07 19:03:39 +01:00
# nginx
sudo vi /etc/nginx/sites-enabled/gitea
2018-12-15 19:38:23 +01:00
sudo service nginx restart
2016-04-02 15:33:36 +02:00
```
2018-12-07 16:37:28 +01:00
## Gitea Documentation
- [docs.gitea.io](https://docs.gitea.io/)