如果您想使用现有的 MySQL 服务器,则需要在
seafile-server.yml
中删除(或注明)整个
db
服务,否则正在运行冗余数据库服务
service:
# note or remove the entire `db` service
#db:
#image: ${SEAFILE_DB_IMAGE:-mariadb:10.11}
#container_name: seafile-mysql
# ... other parts in service `db`
# do not change other services
...
更重要的是,您必须修改
.env
才能使用 MySQL 正确设置字段:
SEAFILE_MYSQL_DB_HOST=192.168.0.2
SEAFILE_MYSQL_DB_PORT=3306
INIT_SEAFILE_MYSQL_ROOT_PASSWORD=ROOT_PASSWORD
SEAFILE_MYSQL_DB_USER=seafile # the user name of the user you like to use for Seafile server
SEAFILE_MYSQL_DB_PASSWORD=PASSWORD # the password of the user you like to use for Seafile server
在安装过程中需要
INIT_SEAFILE_MYSQL_ROOT_PASSWORD
(即首次部署)。安装 Seafile 后,用户
seafile
将用于连接到 MySQL 服务器 (SEAFILE_MYSQL_DB_PASSWORD),然后您可以删除
INIT_SEAFILE_MYSQL_ROOT_PASSWORD
。