mirror of
https://github.com/TxtDot/documentation.git
synced 2024-11-22 21:06:22 +03:00
Separate sections, note about nodejs version
This commit is contained in:
parent
0bcf353bad
commit
a2d7f48503
1 changed files with 27 additions and 10 deletions
|
@ -2,11 +2,14 @@
|
||||||
|
|
||||||
## Without Docker
|
## Without Docker
|
||||||
|
|
||||||
Install Node and NPM:
|
### Install nodejs and npm
|
||||||
|
|
||||||
|
For Debian, Ubuntu: packages in the repository are so old,
|
||||||
|
consider installing them with [NodeSource](https://github.com/nodesource/distributions#installation-instructions).
|
||||||
|
Minimal required version is NodeJS 18.
|
||||||
|
|
||||||
|
Other distros:
|
||||||
```bash
|
```bash
|
||||||
# Debian, Ubuntu
|
|
||||||
# TODO: Really old version in repos, use nodesource
|
|
||||||
sudo apt install nodejs npm
|
|
||||||
# CentOS
|
# CentOS
|
||||||
sudo yum install nodejs
|
sudo yum install nodejs
|
||||||
# Arch
|
# Arch
|
||||||
|
@ -15,26 +18,37 @@ sudo pacman -S nodejs npm
|
||||||
doas apk add nodejs npm
|
doas apk add nodejs npm
|
||||||
```
|
```
|
||||||
|
|
||||||
Create a user for txtdot, log in:
|
### User for txtdot
|
||||||
|
|
||||||
|
Almost all distros except Alpine:
|
||||||
```bash
|
```bash
|
||||||
# Not Alpine (coreutils)
|
|
||||||
sudo useradd -r -m -s /sbin/nologin -U txtdot
|
sudo useradd -r -m -s /sbin/nologin -U txtdot
|
||||||
sudo -u txtdot bash
|
sudo -u txtdot bash
|
||||||
|
```
|
||||||
|
|
||||||
# Alpine (busybox)
|
Alpine Linux with busybox + doas:
|
||||||
|
```bash
|
||||||
doas addgroup -S txtdot
|
doas addgroup -S txtdot
|
||||||
doas adduser -h /home/txtdot -s /sbin/nologin -G txtdot -S -D txtdot
|
doas adduser -h /home/txtdot -s /sbin/nologin -G txtdot -S -D txtdot
|
||||||
doas -u txtdot bash
|
doas -u txtdot bash
|
||||||
```
|
```
|
||||||
|
|
||||||
Clone the repo:
|
### Build, config and launch
|
||||||
|
|
||||||
|
Clone the git repository, cd into it:
|
||||||
```bash
|
```bash
|
||||||
git clone https://github.com/txtdot/txtdot.git src
|
git clone https://github.com/txtdot/txtdot.git src
|
||||||
|
cd src
|
||||||
|
```
|
||||||
|
|
||||||
|
Copy and modify the sample config file (see the Environment section):
|
||||||
|
```bash
|
||||||
|
cp .env.example .env
|
||||||
|
nano .env
|
||||||
```
|
```
|
||||||
|
|
||||||
Install packages, compile TS:
|
Install packages, compile TS:
|
||||||
```bash
|
```bash
|
||||||
cd src
|
|
||||||
npm install
|
npm install
|
||||||
npm run build
|
npm run build
|
||||||
```
|
```
|
||||||
|
@ -44,7 +58,10 @@ Manually start the server to check if it works (Ctrl+C to exit):
|
||||||
npm run start
|
npm run start
|
||||||
```
|
```
|
||||||
|
|
||||||
Log out from txtdot account: `exit`
|
Log out from the txtdot account:
|
||||||
|
```bash
|
||||||
|
exit
|
||||||
|
```
|
||||||
|
|
||||||
### Add txtdot to autostart
|
### Add txtdot to autostart
|
||||||
Either using systemd unit file:
|
Either using systemd unit file:
|
||||||
|
|
Loading…
Add table
Reference in a new issue