Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
b51febc
Merge pull request #91 from YunoHost-Apps/testing
Josue-T Nov 29, 2023
60cb5e5
Migrate to manifestv2 and other changes:
Salamandar Sep 9, 2023
bc7f000
Fix app.ini: Add authentication for email sending
Salamandar Nov 9, 2023
c3d72d5
Fix mail config
Josue-T Nov 29, 2023
238dec4
SSO is supported
Josue-T Nov 29, 2023
5e22a74
We don't need ram to build app
Josue-T Nov 29, 2023
18696ac
Fix manifest
Josue-T Nov 29, 2023
479e4d7
cleanup app.ini
Josue-T Nov 29, 2023
d5f508a
fix init permissions
Josue-T Nov 29, 2023
e73acdd
cleanup all scripts
Josue-T Nov 29, 2023
361d0bb
Fix email stack config
Josue-T Nov 29, 2023
b91b7e2
Remove limit on data in nginx
Josue-T Nov 29, 2023
7e2809d
Remove skype verify as it's obsolete
Josue-T Nov 30, 2023
a315e28
Use smtp with starttls (not smtps)
Josue-T Nov 30, 2023
396f0d4
Use correct email to reply
Josue-T Nov 30, 2023
1a620af
Fix log configuration
Josue-T Nov 30, 2023
676d283
Use localhost instead of domain for mail server address
Josue-T Dec 13, 2023
b7b73bb
Add jwt secret because gitea edit config if not present
Josue-T Dec 13, 2023
cd38b3e
Fix linter
Josue-T Dec 6, 2023
0747739
Use $app instead of $YNH_APP_ID
Josue-T Dec 18, 2023
b0e2306
Force LDAP sync at first start
Josue-T Jan 24, 2024
b402f90
Improve permission config
Josue-T Dec 20, 2023
0dbe2ed
Fix email retriving
Josue-T Jan 24, 2024
39be9a3
Update ldap config also on update
Josue-T Jan 24, 2024
77c3678
Disable reverse proxy authentication temporately
Josue-T Jan 24, 2024
01f0924
Update login source config and add group support
Josue-T Jan 24, 2024
094fe33
Upgrade gitea to 1.21.5
Josue-T Feb 1, 2024
7c89c86
Merge remote-tracking branch 'testing' into manifestv2
Josue-T Feb 2, 2024
b9d4c6b
Cleanup unused code
Josue-T Feb 2, 2024
82853f2
Fix upgrade
Josue-T Feb 2, 2024
57740d8
Move all script in script folder
Josue-T Feb 5, 2024
bee1ad0
Fix account created by remote user header
Josue-T Feb 5, 2024
8fb1399
Update LDAP config
Josue-T Feb 5, 2024
5f7b535
Add support to sync yunohost group to organisation teams
Josue-T Feb 5, 2024
7064c0c
Fix imap mail config
Josue-T Feb 5, 2024
1b1c132
Auto-update README
yunohost-bot Feb 6, 2024
0073541
Merge branch 'testing' into manifestv2
Josue-T Feb 6, 2024
d7f1129
Add test update from last package v1 version
Josue-T Feb 6, 2024
919ad78
Fix missing parameter for user admin on tests
Josue-T Feb 6, 2024
37efab8
Fix tests config
Josue-T Feb 6, 2024
d527673
Fix test config
Josue-T Feb 6, 2024
0fd3ddd
Try fix test.toml
Josue-T Feb 6, 2024
e096dda
Fix typo
Josue-T Feb 7, 2024
d836db8
Optimize upgrade: avoid to set premission on data dir to just call gi…
Josue-T Feb 7, 2024
311a419
Simpify permission set and avoid to set all perms each time
Josue-T Feb 7, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
80 changes: 0 additions & 80 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,86 +25,6 @@ Gitea is a fork of Gogs a self-hosted Git service written in Go. Alternative to

![Screenshot of Gitea](./doc/screenshots/screenshot.png)

## Disclaimers / important information

## Additional informations

### Notes on SSH usage

If you want to use Gitea with SSH and be able to pull/push with your SSH key, your SSH daemon must be properly configured to use private/public keys. Here is a sample configuration `/etc/ssh/sshd_config` that works with Gitea:

```bash
PubkeyAuthentication yes
AuthorizedKeysFile /home/yunohost.app/%u/.ssh/authorized_keys
ChallengeResponseAuthentication no
PasswordAuthentication no
UsePAM no
```

You must also add your public key to your Gitea profile.

When using SSH on any port other than 22, you need to add these lines to your SSH configuration `~/.ssh/config`:

```bash
Host domain.tld
port 2222 # change this with the port you use
```

### Upgrade

By default, a backup is performed before upgrading. To avoid this, you have the following options:
- Pass the `NO_BACKUP_UPGRADE` env variable with `1` at each upgrade. For example `NO_BACKUP_UPGRADE=1 yunohost app upgrade gitea`.
- Set `disable_backup_before_upgrade` to `1`. You can set it with this command:

`yunohost app setting gitea disable_backup_before_upgrade -v 1`

After that, the settings will be applied for **all** the next updates.

From command line:

`yunohost app upgrade gitea`

### Backup

This application now uses the core-only feature of the backup. To keep the integrity of the data and to have a better guarantee of the restoration it is recommended to proceed as follows:

- Stop Gitea service with this command:

`systemctl stop gitea.service`

- Launch Gitea backup with this command:

`yunohost backup create --app gitea`

- Backup your data with your specific strategy (could be with rsync, borg backup or just cp). The data is generally stored in `/home/yunohost.app/gitea`.
- Restart Gitea service with theses command:

`systemctl start gitea.service`

### Remove

Due of the backup core only feature the data directory in `/home/yunohost.app/gitea` **is not removed**. It must be manually deleted to purge user data from the app.

### LFS setup
To use a repository with an `LFS` setup, you need to activate it on `/opt/gitea/custom/conf/app.ini`

```ini
[server]
LFS_START_SERVER = true
LFS_HTTP_AUTH_EXPIRY = 20m
```
By default, NGINX is configured with a maximum value for uploading files at 200 MB. It's possible to change this value on `/etc/nginx/conf.d/my.domain.tld.d/gitea.conf`.
```
client_max_body_size 200M;
```
Don't forget to restart Gitea `sudo systemctl restart gitea.service`.

> These settings are restored to the default configuration when updating Gitea. Remember to restore your configuration after all updates.

### Git command access with HTTPS

If you want to use the Git command (like `git clone`, `git pull`, `git push`), you need to set this app as **public**.

## Documentation and resources

* Official app website: <https://gitea.io/>
Expand Down
80 changes: 0 additions & 80 deletions README_fr.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,86 +25,6 @@ Gitea is a fork of Gogs a self-hosted Git service written in Go. Alternative to

![Capture d’écran de Gitea](./doc/screenshots/screenshot.png)

## Avertissements / informations importantes

## Additional informations

### Notes on SSH usage

If you want to use Gitea with SSH and be able to pull/push with your SSH key, your SSH daemon must be properly configured to use private/public keys. Here is a sample configuration `/etc/ssh/sshd_config` that works with Gitea:

```bash
PubkeyAuthentication yes
AuthorizedKeysFile /home/yunohost.app/%u/.ssh/authorized_keys
ChallengeResponseAuthentication no
PasswordAuthentication no
UsePAM no
```

You must also add your public key to your Gitea profile.

When using SSH on any port other than 22, you need to add these lines to your SSH configuration `~/.ssh/config`:

```bash
Host domain.tld
port 2222 # change this with the port you use
```

### Upgrade

By default, a backup is performed before upgrading. To avoid this, you have the following options:
- Pass the `NO_BACKUP_UPGRADE` env variable with `1` at each upgrade. For example `NO_BACKUP_UPGRADE=1 yunohost app upgrade gitea`.
- Set `disable_backup_before_upgrade` to `1`. You can set it with this command:

`yunohost app setting gitea disable_backup_before_upgrade -v 1`

After that, the settings will be applied for **all** the next updates.

From command line:

`yunohost app upgrade gitea`

### Backup

This application now uses the core-only feature of the backup. To keep the integrity of the data and to have a better guarantee of the restoration it is recommended to proceed as follows:

- Stop Gitea service with this command:

`systemctl stop gitea.service`

- Launch Gitea backup with this command:

`yunohost backup create --app gitea`

- Backup your data with your specific strategy (could be with rsync, borg backup or just cp). The data is generally stored in `/home/yunohost.app/gitea`.
- Restart Gitea service with theses command:

`systemctl start gitea.service`

### Remove

Due of the backup core only feature the data directory in `/home/yunohost.app/gitea` **is not removed**. It must be manually deleted to purge user data from the app.

### LFS setup
To use a repository with an `LFS` setup, you need to activate it on `/opt/gitea/custom/conf/app.ini`

```ini
[server]
LFS_START_SERVER = true
LFS_HTTP_AUTH_EXPIRY = 20m
```
By default, NGINX is configured with a maximum value for uploading files at 200 MB. It's possible to change this value on `/etc/nginx/conf.d/my.domain.tld.d/gitea.conf`.
```
client_max_body_size 200M;
```
Don't forget to restart Gitea `sudo systemctl restart gitea.service`.

> These settings are restored to the default configuration when updating Gitea. Remember to restore your configuration after all updates.

### Git command access with HTTPS

If you want to use the Git command (like `git clone`, `git pull`, `git push`), you need to set this app as **public**.

## Documentations et ressources

* Site officiel de l’app : <https://gitea.io/>
Expand Down
27 changes: 0 additions & 27 deletions check_process

This file was deleted.

92 changes: 59 additions & 33 deletions conf/app.ini
Original file line number Diff line number Diff line change
@@ -1,87 +1,113 @@
;https://github.com/gogits/gogs/blob/master/conf/app.ini
;https://github.com/go-gitea/gitea/blob/release/v1.20/custom/conf/app.example.ini
APP_NAME = Gitea
RUN_USER = __APP__
RUN_MODE = prod
WORK_PATH = __INSTALL_DIR__

[actions]
ENABLED = true
ENABLED = false

[database]
DB_TYPE = mysql
HOST = 127.0.0.1:3306
NAME = __DB_USER__
NAME = __DB_NAME__
USER = __DB_USER__
PASSWD = __DB_PASSWORD__
PASSWD = __DB_PWD__
SSL_MODE = disable
PATH = data/gitea.db
LOG_SQL = false
LOG_SQL = false

[repository]
ROOT = __REPOS_PATH__
ROOT = __DATA_DIR__/repositories
FORCE_PRIVATE = false

[server]
DOMAIN = __DOMAIN__
HTTP_PORT = __PORT__
HTTP_ADDR = 127.0.0.1
ROOT_URL = https://__DOMAIN____PATH_URL__
DISABLE_SSH = false
SSH_PORT = __SSH_PORT__
DOMAIN = __DOMAIN__
HTTP_PORT = __PORT__
HTTP_ADDR = 127.0.0.1
ROOT_URL = https://__DOMAIN____PATH__
DISABLE_SSH = false
SSH_PORT = __SSH_PORT__
OFFLINE_MODE = false
APP_DATA_PATH = __DATA_PATH__
APP_DATA_PATH = __DATA_DIR__/data
LANDING_PAGE = explore
LFS_START_SERVER = true
LFS_JWT_SECRET = __LFS_KEY__
LFS_JWT_SECRET = __LFS_JWT_SECRET__

[mailer]
ENABLED = true
SMTP_ADDR = 127.0.0.1
SMTP_PORT = 25
FROM = "Gitea" <gitea-noreply@__DOMAIN__>
SMTP_ADDR = localhost
SMTP_PORT = 587
PROTOCOL = smtp+starttls
FROM = "Gitea" <__APP__@__DOMAIN__>
USER = __APP__
PASSWD = __MAIL_PWD__
FORCE_TRUST_SERVER_CERT = true

[email.incoming]
ENABLED = true
REPLY_TO_ADDRESS = __APP__+%{token}@__DOMAIN__
HOST = localhost
PORT = 993
USE_TLS = true
SKIP_TLS_VERIFY = true
USERNAME = __APP__
PASSWORD = __MAIL_PWD__

[service]
REGISTER_EMAIL_CONFIRM = false
ENABLE_NOTIFY_MAIL = true
DISABLE_REGISTRATION = true
ENABLE_CAPTCHA = false
REQUIRE_SIGNIN_VIEW = false
ENABLE_REVERSE_PROXY_AUTHENTICATION = true
ENABLE_REVERSE_PROXY_AUTO_REGISTRATION = true
ENABLE_NOTIFY_MAIL = true
DISABLE_REGISTRATION = true
ENABLE_CAPTCHA = false
REQUIRE_SIGNIN_VIEW = false
# reverse proxy authentication disabled until https://github.com/go-gitea/gitea/pull/18452 is merged
# as it broke completely the LDAP sync
ENABLE_REVERSE_PROXY_AUTHENTICATION = false
ENABLE_REVERSE_PROXY_AUTO_REGISTRATION = false

[picture]
AVATAR_UPLOAD_PATH = __DATA_PATH__/avatars
AVATAR_UPLOAD_PATH = __DATA_DIR__/data/avatars

[attachment]
PATH = __DATA_PATH__/attachments
PATH = __DATA_DIR__/data/attachments

[session]
PROVIDER = memory

[log]
MODE = file
LEVEL = Info
MODE = file
LEVEL = Info
ROOT_PATH = /var/log/__APP__
logger.access.MODE =
logger.access.MODE =
logger.router.MODE = router
logger.xorm.MODE = xorm

REDIRECT_MACARON_LOG= true
MACARON = file
REDIRECT_MACARON_LOG = true
MACARON = file

[log.file]
FILE_NAME = gitea.log
LEVEL = Info

[log.router]
MODE = file
FILE_NAME = router.log
LEVEL = Warn

[log.xorm]
MODE = file
FILE_NAME = xorm.log
LEVEL = Warn

[security]
INSTALL_LOCK = true
SECRET_KEY = __KEY__
SECRET_KEY = __SECRET_KEY__
REVERSE_PROXY_AUTHENTICATION_USER = REMOTE-USER
REVERSE_PROXY_TRUSTED_PROXIES = 127.0.0.0/8,::1/128
REVERSE_PROXY_TRUSTED_PROXIES = 127.0.0.0/8,::1/128
INTERNAL_TOKEN = __INTERNAL_TOKEN__

[oauth2]
JWT_SECRET = __JWT_SECRET__

[cron.sync_external_users]
ENABLED = true
RUN_AT_START = false
5 changes: 0 additions & 5 deletions conf/gogs_migrations

This file was deleted.

32 changes: 0 additions & 32 deletions conf/gogs_post_migration.sh

This file was deleted.

6 changes: 0 additions & 6 deletions conf/login_source.sql

This file was deleted.

Loading