Skip to content

Commit

Permalink
Merge pull request #390 from haiwen/opt_12.0_exists_mysql
Browse files Browse the repository at this point in the history
opt: 12.0 deploy with exists mysql
  • Loading branch information
freeplant authored Nov 12, 2024
2 parents 7c7c91d + 4be4a5a commit 2938022
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 3 deletions.
2 changes: 1 addition & 1 deletion manual/setup/cluster_deploy_with_docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand Down
19 changes: 17 additions & 2 deletions manual/setup/setup_with_an_existing_mysql_server.md
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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`.
`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`.

0 comments on commit 2938022

Please sign in to comment.