diff --git a/website/docs/install/_category_.json b/website/docs/install/_category_.json new file mode 100644 index 0000000..6346441 --- /dev/null +++ b/website/docs/install/_category_.json @@ -0,0 +1,4 @@ +{ + "label": "Install", + "position": 2 +} diff --git a/website/docs/install/manual.md b/website/docs/install/manual.md new file mode 100644 index 0000000..d9f361e --- /dev/null +++ b/website/docs/install/manual.md @@ -0,0 +1,58 @@ +--- +sidebar_position: 1 +--- + +# Install without docker + +Use docker to install `Tianji` is best way which you dont need consider about enviroment problem. + +But if your server not support dockerize, you can try to install by manual. + +## Requirements + +You need: + +- [Node.js](https://nodejs.org/en/download/) 18 / 20.4 +- [pnpm](https://pnpm.io/) 8.15.3+ +- [Git](https://git-scm.com/downloads) +- [postgresql](https://www.postgresql.org/) +- [pm2](https://pm2.keymetrics.io/) - For running Tianji in the background +- [apprise](https://github.com/caronc/apprise) - optional, if you need it to notify + +## Clone Code and Build + +```bash +git clone https://github.com/msgbyte/tianji.git +cd tianji +pnpm install + +pnpm build +``` + +## Prepare Environment File + +Create a `.env` file in `src/server` + +```ini +DATABASE_URL="postgresql://user:pass@127.0.0.1:5432/tianji?schema=public&connection_limit=10" +JWT_SECRET="replace-me-with-a-random-string" +``` + +Make sure your database url is correct. and dont remember create database before. + +For more environment can check this document [environment](../environment.md) + +## Run server + +```bash +npm install pm2 -g && pm2 install pm2-logrotate + +# Init db migrate +cd src/server +pnpm db:migrate:apply + +# Start Server +pm2 start ./dist/src/server/main.js --name tianji +``` + +Default, `Tianji` will run on http://localhost:12345 diff --git a/website/docs/monitor/_category_.json b/website/docs/monitor/_category_.json index 3deb759..7048cce 100644 --- a/website/docs/monitor/_category_.json +++ b/website/docs/monitor/_category_.json @@ -1,4 +1,4 @@ { "label": "Monitor", - "position": 3 + "position": 13 } diff --git a/website/docs/server-status/_category_.json b/website/docs/server-status/_category_.json index 0fadd87..a24e19b 100644 --- a/website/docs/server-status/_category_.json +++ b/website/docs/server-status/_category_.json @@ -1,4 +1,4 @@ { "label": "Server Status", - "position": 4 + "position": 14 } diff --git a/website/docs/telemetry/_category_.json b/website/docs/telemetry/_category_.json index bc47e6f..1ac9e52 100644 --- a/website/docs/telemetry/_category_.json +++ b/website/docs/telemetry/_category_.json @@ -1,4 +1,4 @@ { "label": "Telemetry", - "position": 5 + "position": 15 } diff --git a/website/docs/website/_category_.json b/website/docs/website/_category_.json index eca479e..debbfb5 100644 --- a/website/docs/website/_category_.json +++ b/website/docs/website/_category_.json @@ -1,4 +1,4 @@ { "label": "Website", - "position": 2 + "position": 10 }