[docs] dependency docs
This commit is contained in:
parent
2eee055f2a
commit
3d24ee60cb
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"label": "Configuration Reference",
|
"label": "Configuration Reference",
|
||||||
"position": 2,
|
"position": 3,
|
||||||
"link": {
|
"link": {
|
||||||
"type": "generated-index",
|
"type": "generated-index",
|
||||||
"description": "Configuration options for trifid-api."
|
"description": "Configuration options for trifid-api."
|
||||||
|
|
|
@ -0,0 +1,8 @@
|
||||||
|
{
|
||||||
|
"label": "Installing trifid-api",
|
||||||
|
"position": 2,
|
||||||
|
"link": {
|
||||||
|
"type": "generated-index",
|
||||||
|
"description": "Directions on installing trifid-api."
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,68 @@
|
||||||
|
---
|
||||||
|
sidebar_position: 1
|
||||||
|
---
|
||||||
|
import Tabs from '@theme/Tabs';
|
||||||
|
import TabItem from '@theme/TabItem';
|
||||||
|
import CodeBlock from '@theme/CodeBlock';
|
||||||
|
|
||||||
|
# Dependencies
|
||||||
|
|
||||||
|
trifid-api requires a few dependencies to compile and run.
|
||||||
|
|
||||||
|
In short, you need:
|
||||||
|
- the Rust toolchain
|
||||||
|
- a PostgreSQL database
|
||||||
|
|
||||||
|
More details and instructions follow.
|
||||||
|
|
||||||
|
## Rust Toolchain
|
||||||
|
|
||||||
|
trifid-api is a Rust application, and thus needs the Rust toolchain installed to compile it. Pre-built binaries for trifid-api are planned, but currently not available. It is reccomended that you use [rustup](https://rustup.rs) to install the Rust toolchain.
|
||||||
|
|
||||||
|
<Tabs groupId="os">
|
||||||
|
<TabItem value="win" label="Windows">
|
||||||
|
trifid-api does not run very well on Windows. It is reccomended that you use macOS or Linux for a production deployment.
|
||||||
|
If you wish to continue anyway, download and run <a href="https://win.rustup.rs">the rustup installer</a>.
|
||||||
|
</TabItem>
|
||||||
|
<TabItem value="osx" label="macOS">
|
||||||
|
<CodeBlock>
|
||||||
|
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
|
||||||
|
</CodeBlock>
|
||||||
|
</TabItem>
|
||||||
|
<TabItem value="lin" label="Linux">
|
||||||
|
<CodeBlock>
|
||||||
|
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
|
||||||
|
</CodeBlock>
|
||||||
|
</TabItem>
|
||||||
|
</Tabs>
|
||||||
|
|
||||||
|
## PostgreSQL
|
||||||
|
|
||||||
|
PostgreSQL is the database that trifid-api uses, and you must have a functional PostgreSQL database to do this.
|
||||||
|
Instructions on how to install PostgreSQL is left up to the reader. Once Postgres is installed, come back here for database setup instructions.
|
||||||
|
|
||||||
|
## Creating the database
|
||||||
|
|
||||||
|
trifid-api must run on its own isolated database with its own isolated user, for security. Open a psql prompt with superuser access, and run the following commands to create your database and user:
|
||||||
|
|
||||||
|
:::danger
|
||||||
|
Please use a secure password for your database. A good way to generate this is with `openssl rand -hex 32` if you have OpenSSL installed.
|
||||||
|
:::
|
||||||
|
|
||||||
|
```sql
|
||||||
|
CREATE DATABASE trifid;
|
||||||
|
CREATE USER trifid WITH ENCRYPTED PASSWORD '<your_super_secure_password_here>';
|
||||||
|
GRANT ALL PRIVILEGES ON DATABASE trifid TO trifid;
|
||||||
|
GRANT ALL PRIVILEGES ON SCHEMA public TO trifid;
|
||||||
|
\c trifid
|
||||||
|
GRANT ALL PRIVILEGES ON DATABASE trifid TO trifid;
|
||||||
|
GRANT ALL PRIVILEGES ON SCHEMA public TO trifid;
|
||||||
|
```
|
||||||
|
|
||||||
|
Once this is complete, your Postgres connection url will look like:
|
||||||
|
|
||||||
|
```
|
||||||
|
postgres://trifid:<your_super_secure_password_here>@<postgres_ip>/trifid
|
||||||
|
```
|
||||||
|
|
||||||
|
Once this is complete, you are ready to compile trifid-api!
|
|
@ -9,4 +9,4 @@ trifid-api is a complete reimplementation of the [Defined Networking](https://de
|
||||||
|
|
||||||
:::caution
|
:::caution
|
||||||
Although trifid-api is battle-tested and has been used in production networks for months with no major issues, it should still be considered experimental software. Please, [report any bugs you find](https://git.e3t.cc/core/trifid/issues) to assist with further development of trifid-api.
|
Although trifid-api is battle-tested and has been used in production networks for months with no major issues, it should still be considered experimental software. Please, [report any bugs you find](https://git.e3t.cc/core/trifid/issues) to assist with further development of trifid-api.
|
||||||
:::
|
:::
|
||||||
|
|
Loading…
Reference in New Issue