Merge pull request #240 from haiwen/Use-an-existing-mysql-server

Use an existing mysql server
This commit is contained in:
Daniel Pan 2024-01-26 22:57:15 +08:00 committed by GitHub
commit 5d6ee3a5d5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 56 additions and 0 deletions

View File

@ -104,6 +104,34 @@ seafile:
```
### Use an existing mysql-server
If you want to use an existing mysql-server, you can modify the `docker-compose.yml` as follows
```yml
services:
#db:
#image: mariadb:10.11
#...
seafile:
...
environment:
...
- DB_HOST=192.168.0.2
- DB_ROOT_PASSWD=mysql_root_password
...
depends_on:
#- db
- memcached
```
* The entire db chapter needs to be removed
* The host of MySQL (DB_HOST)
* The password of MySQL root (DB_ROOT_PASSWD)
* db in depends_on chapter needs to be removed
* DB_ROOT_PASSWD is needed during installation. Later, after Seafile is installed, the user `seafile` will be used to connect to the mysql-server (in conf/seafile.conf). You can remove the `DB_ROOT_PASSWD`.
### Modify Seafile server configurations
The config files are under `shared/seafile/conf`. You can modify the configurations according to [Seafile manual](https://manual.seafile.com/)

View File

@ -217,6 +217,34 @@ seafile:
```
## Use an existing mysql-server
If you want to use an existing mysql-server, you can modify the `docker-compose.yml` as follows
```yml
services:
#db:
#image: mariadb:10.11
#...
seafile:
...
environment:
...
- DB_HOST=192.168.0.2
- DB_ROOT_PASSWD=mysql_root_password
...
depends_on:
#- db
- memcached
```
* The entire db chapter needs to be removed
* The host of MySQL (DB_HOST)
* The password of MySQL root (DB_ROOT_PASSWD)
* db in depends_on chapter needs to be removed
* When Seafile is installed, the user `seafile` will be used to connect to the mysql-server (in conf/seafile.conf). You can remove the `DB_ROOT_PASSWD`.
## Seafile directory structure
### `/shared`