From 4be4a5aca4ee20ed0073876729c592e5c86074e7 Mon Sep 17 00:00:00 2001 From: Junxiang Huang Date: Tue, 12 Nov 2024 10:22:06 +0800 Subject: [PATCH] opt: 12.0 exists mysql deployment --- manual/setup/cluster_deploy_with_docker.md | 2 +- .../setup_with_an_existing_mysql_server.md | 19 +++++++++++++++++-- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/manual/setup/cluster_deploy_with_docker.md b/manual/setup/cluster_deploy_with_docker.md index b1e120a70..c09f39245 100644 --- a/manual/setup/cluster_deploy_with_docker.md +++ b/manual/setup/cluster_deploy_with_docker.md @@ -43,7 +43,7 @@ We assume you have already deployed memcache, MariaDB, ElasticSearch in separate wget https://manual.seafile.com/12.0/docker/cluster/seafile-server.yml ``` -4. Modify the [variables](../config/env.md) in `.env` (especially terms like `<...>`). +4. Modify the [variables](../config/env.md) in `.env` (especially the terms like `<...>`). !!! tip If you have already deployed AWS S3 storage backend and plan to apply it to Seafile cluster, you can modify the variables in `.env` to [set them synchronously during initialization](../config/env.md#s3-storage-backend-configurations-only-valid-in-pro-edition-at-deploying-first-time). diff --git a/manual/setup/setup_with_an_existing_mysql_server.md b/manual/setup/setup_with_an_existing_mysql_server.md index 34eecf123..0f9613330 100644 --- a/manual/setup/setup_with_an_existing_mysql_server.md +++ b/manual/setup/setup_with_an_existing_mysql_server.md @@ -1,6 +1,21 @@ # Deploy with an existing MySQL server -If you want to use an existing MySQL server, you can modify the `.env` as follows +The entire `db` service needs to be removed (or noted) in `seafile-server.yml` if you would like to use an existing MySQL server, otherwise there is a redundant database service is running + +```yml +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 +... +``` + +What's more, you have to modify the `.env` to set correctly the fields with MySQL: ```env SEAFILE_MYSQL_DB_HOST=192.168.0.2 @@ -10,4 +25,4 @@ SEAFILE_MYSQL_DB_PASSWORD=PASSWORD ``` !!! tip - `INIT_SEAFILE_MYSQL_ROOT_PASSWORD` is needed during installation (i.e., the deployment in the first time). After Seafile is installed, the user `seafile` will be used to connect to the MySQL server (SEAFILE_MYSQL_DB_PASSWORD), then you can remove the `INIT_SEAFILE_MYSQL_ROOT_PASSWORD`. \ No newline at end of file + `INIT_SEAFILE_MYSQL_ROOT_PASSWORD` is needed during installation (i.e., the deployment in the first time). After Seafile is installed, the user `seafile` will be used to connect to the MySQL server (SEAFILE_MYSQL_DB_PASSWORD), then you can remove the `INIT_SEAFILE_MYSQL_ROOT_PASSWORD`.