-
Notifications
You must be signed in to change notification settings - Fork 0
Deploying the Unipept API
Tibo Vande Moortele edited this page Aug 7, 2024
·
2 revisions
Important
The API requires some files and a running database to function. Instructions on how to construct these files, and how to start the database can found in the Building the suffix array section of the unipept-index repository. Make sure to follow all the listed steps before proceeding. The API will not be able to start when there are files missing.
Clone the unipept-api repository
git clone https://github.com/unipept/unipept-api
Switch to the rust-implementation branch
git switch rust-implementation
Enter the repository and build the project
cd unipept-api
cargo build --release
Resuming the suffix array screen session
Warning
It is possible that the server has no suffix-array
screen running yet. In that case you can execute the following command to start a new session.
screen -S suffix-array
screen -r suffix-array
Start the API service (from the root of the unipept-api repository)
sudo ./target/release/unipept-api -i <index_location> -d <database-address> -p <port>
where:
- index_location: The location of all index files (default:
/mnt/data/uniprot-{version}/suffix-array
) - database_address: Address of the database (default:
mysql://{user}:{password}@127.0.0.1:3306/unipept
) - port: port to serve (default: 4000 for development, 80 for public)