Added new gitea database (#528)

Excluded gitea database from mailcow
Dieser Commit ist enthalten in:
fabreg 2023-02-09 21:47:14 +01:00 committet von GitHub
Ursprung c2be313e63
Commit b11baa5df1
Es konnte kein GPG-SchlĂĽssel zu dieser Signatur gefunden werden
GPG-SchlĂĽssel-ID: 4AEE18F83AFDEB23

Datei anzeigen

@ -1,6 +1,14 @@
With Gitea' ability to authenticate over SMTP it is trivial to integrate it with mailcow. Few changes are needed:
1\. Open `docker-compose.override.yml` and add gitea:
1\. In order to create a database for gitea, connect to your shell and execute the following commands:
```
source mailcow.conf
docker exec -it $(docker ps -f name=mysql-mailcow -q) mysql -uroot -p${DBROOT} -e "CREATE DATABASE gitea;"
docker exec -it $(docker ps -f name=mysql-mailcow -q) mysql -uroot -p${DBROOT} -e "CREATE USER 'gitea'@'%' IDENTIFIED BY 'your_strong_password';"
docker exec -it $(docker ps -f name=mysql-mailcow -q) mysql -uroot -p${DBROOT} -e "GRANT ALL PRIVILEGES ON gitea.* TO 'gitea'@'%';
```
2\. Open `docker-compose.override.yml` and add gitea:
```yaml
version: '2.1'
@ -18,14 +26,14 @@ services:
- "${GITEA_SSH_PORT:-127.0.0.1:4000}:22"
```
2\. Create `data/conf/nginx/site.gitea.custom`, add:
3\. Create `data/conf/nginx/site.gitea.custom`, add:
```
location /gitea/ {
proxy_pass http://gitea:3000/;
}
```
3\. Open `mailcow.conf` and define the binding you want gitea to use for SSH. Example:
4\. Open `mailcow.conf` and define the binding you want gitea to use for SSH. Example:
```
GITEA_SSH_PORT=127.0.0.1:4000
@ -63,7 +71,7 @@ GITEA_SSH_PORT=127.0.0.1:4000
Go head with step 7 (Remember to use https instead of http, `https://mx.example.org/gitea/`)
7\. Open `http://${MAILCOW_HOSTNAME}/gitea/`, for example `http://mx.example.org/gitea/`. For database details set `mysql` as database host. Use the value of DBNAME found in mailcow.conf as database name, DBUSER as database user and DBPASS as database password.
7\. Open `http://${MAILCOW_HOSTNAME}/gitea/`, for example `http://mx.example.org/gitea/`. For database details set `mysql` as database host. Use gitea as database name, gitea as database user and your_strong_password you previously definied at step 1 as database password.
8\. Once the installation is complete, login as admin and set "settings" -> "authorization" -> "enable SMTP". SMTP Host should be `postfix` with port `587`, set `Skip TLS Verify` as we are using an unlisted SAN ("postfix" is most likely not part of your certificate).
@ -91,4 +99,4 @@ ROOT_URL = https://mx.example.org/gitea/
``` bash
docker-compose restart gitea-mailcow
```
```