Update documentation

master
Urban Guacamole 2 years ago
parent 2abcb39b47
commit 0d4b9c979f

@ -11,13 +11,15 @@ Maybe, open an issue. Be sure to demonstrate an effort that you tried to solve t
# Setup
Here's what the setup looks like rn:
- VPS, Debian Buster, 4 GB RAM
- VPS, Debian Bullseye, 8 GB RAM
- user with username nextgen on the server
- my laptop w/ Linux
- Go toolchain installed
- node v10.15 & npm
- node & npm
- Python 3 (required only for index-generator/fix-metajson.py)
Read the server-setup.md file for more precise info.
The programs create their own tables in the DB that they need. Database name is "nextgen". You need to create the materialized views (fresh and search). You can find some useful SQL code in snippets.sql.
Each of the daemons (api, crawl-rss, seedleech-daemon) is its own standalone Go package and resulting binary. You have to compile the binaries yourself. There are systemd .service files available for each of the daemons.

@ -0,0 +1,51 @@
# Run as root
Assumming Debian 11 Bullseye
```apt update
apt upgrade
apt install -y htop kitty-terminfo screenfetch postgresql-13 mosh nload
apt install -y debian-keyring debian-archive-keyring apt-transport-https
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/gpg.key' | tee /etc/apt/trusted.gpg.d/caddy-stable.asc
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/debian.deb.txt' | tee /etc/apt/sources.list.d/caddy-stable.list
apt update
apt install caddy
mkdir /www
adduser nextgen
```
### /etc/caddy/Caddyfile
```
http://torrentparadise.ml, http://torrent-paradise.ml {
reverse_proxy /api/* http://localhost:8000
root * /www/torrent-paradise.ml/
file_server
}
```
### /etc/postgresql/13/main/postgresql.conf
Use https://pgtune.leopard.in.ua/
Just get the optimal settings and paste them at the end of the file, they override the defaults.
### Set up nextgen user and database in Postgres
```
postgres $ createuser -d nextgen
nextgen $ createdb nextgen
```
### Ship compiled static executables to server
You can either build it on the server or just ship the binaries to the server via scp. In the end, you need binaries in /home/nextgen and .service files in /etc/systemd/system/.
Might come in handy: a way to build go binaries truly statically (incl glibc) `CGO_ENABLED=0 GOOS=linux go build -a -ldflags '-extldflags "-static"' .`
### Ship contents of static/ to /www/torrent-paradise.ml
Use scp.
Loading…
Cancel
Save