Update deploy.md

This commit is contained in:
Daniel Pan 2025-01-03 21:55:48 +08:00 committed by GitHub
parent 358bbbd9fc
commit ad8b67f460
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1,22 +1,41 @@
# Deploy SeaSearch
This guide provides detailed instructions for deploying SeaSearch, creating user accounts, and utilizing the SeaSearch APIs.
This document provides step by step guild for deploying SeaSearch using Docker.
## 1. Download the seasearch.yml
## Getting started
Currently, SeaSearch is **only** deployed through Docker. First, you need to download the corresponding `.yml` and `.env` files. Then you need to modify the configuration information in the `.env` file. Finally, start it through `docker-compose`.
The following assumptions and conventions are used in the rest of this document:
* `/opt/seasearch` is the directory for storing SeaSearch docker compose files. If you decide to put SeaSearch in a different directory, adjust all paths accordingly.
* `/opt/seasearch-data` is the directory for storing persisting data of SeaSearch.
## Download the yml and env file
You can download the `.yml` and `.env` files by following commands:
```bash
mkdir /opt/seasearch
cd /opt/seasearch
wget https://haiwen.github.io/seasearch-docs/repo/caddy.yml
wget https://haiwen.github.io/seasearch-docs/repo/seasearch.yml
wget -O .env https://haiwen.github.io/seasearch-docs/repo/env
```
## 2. Modify .env file
## Modify .env file
First, you need to specify the environment variables used by the SeaSearch image in the downloaded `.env` file. Definition of some variables can be found in [here](../config/README.md). Please modify the environment variables (i.e., `<...>`) of the following fields in the `.env` file.
Modify the environment variables of the following fields in the `.env` file.
```shell
SEASEARCH_SERVER_HOSTNAME=seasearch.example.com
#SEASEARCH_IMAGE=seafileltd/seasearch-nomkl:latest # for Apple's chips
SEASEARCH_IMAGE=seafileltd/seasearch:latest
SS_DATA_PATH=/opt/seasearch-data
INIT_SS_ADMIN_USER=<admin-username>
INIT_SS_ADMIN_PASSWORD=<admin-password>
```
!!! warning "For Apple's Chips"
Since Apple's chips (such as M2) do not support [MKL](https://www.intel.com/content/www/us/en/developer/tools/oneapi/onemkl.html), you need to set the relevant image to `seafileltd/seasearch-nomkl:latest` if you use an Apple's chip:
@ -25,31 +44,17 @@ First, you need to specify the environment variables used by the SeaSearch image
SEASEARCH_IMAGE=seafileltd/seasearch-nomkl:latest
```
```shell
SEASEARCH_SERVER_HOSTNAME=seasearch.example.com
## Start the service
#SEASEARCH_IMAGE=seafileltd/seasearch-nomkl:latest # for Apple's chips
SEASEARCH_IMAGE=seafileltd/seasearch:latest
SS_DATA_PATH=<persistent-volume-path-of-seasearch>
INIT_SS_ADMIN_USER=<admin-username>
INIT_SS_ADMIN_PASSWORD=<admin-password>
```
## 3. Start the Service
After completing the above steps, you can start the service through the `docker-compose` command:
Start the service use the following command:
```shell
docker-compose up -d
```
!!! success "SeaSearch server starts normally"
After starting the service, you can browse SeaSearch services in `http://seasearch.example.com/` and login by the `INIT_SS_ADMIN_USER` and `INIT_SS_ADMIN_PASSWORD` defined in the `.env` file.
Finially, you will see the SeaSearch plane like that
Now, you can access SeaSearch services at `http://seasearch.example.com/` and login by the `INIT_SS_ADMIN_USER` and `INIT_SS_ADMIN_PASSWORD` defined in the `.env` file. You will see the SeaSearch plane like below:
![grafik](../media/seasearch_console.png)
![grafik](../media/seasearch_console.png)
!!! tip "After first time start SeaSearch Server"
You can remove the initial admin account informations in `.env` (e.g., `INIT_SS_ADMIN_USER`, `INIT_SS_ADMIN_PASSWORD`), which are only used in the SeaSearch initialization progress (i.e., the **first time** to start services). But make sure **you have recorded it somewhere else in case you forget the password**.
You can remove the initial admin account informations in `.env` (e.g., `INIT_SS_ADMIN_USER`, `INIT_SS_ADMIN_PASSWORD`), which are only used in the SeaSearch initialization progress. (Make sure **you have recorded it somewhere else in case you forget the password**.)