Updated as of 16.07.2024

Dante4 2024-07-16 09:40:39 +03:00
parent 77b8ec5c58
commit b1ac9a39f9

@ -1,7 +1,7 @@
**It is highly recommended that you deploy using [Docker](INSTALL.md) as it is easier install and maintain.** **It is highly recommended that you deploy using [Docker](INSTALL.md) as it is easier install and maintain.**
This guide may help the few users who do not wish to use Docker. Please note that this guide may be incomplete or out of date. Additionally, this guide assumes Arch Linux. Although exact instructions for other This guide may help the few users who do not wish to use Docker. Please note that this guide may be incomplete or out of date. Additionally, this guide assumes Arch Linux (or Ubuntu 24.04). Although exact instructions for other distributions are different, the steps stay roughly the same.
distributions are different, the steps stay roughly the same. If you meet problem check Dockerfile for server and client.
### Installing hard dependencies ### Installing hard dependencies
@ -11,6 +11,8 @@ Szurubooru requires the following dependencies:
- FFmpeg - FFmpeg
- node.js - node.js
Pacman
```console ```console
user@host:~$ sudo pacman -S postgresql user@host:~$ sudo pacman -S postgresql
user@host:~$ sudo pacman -S python user@host:~$ sudo pacman -S python
@ -18,6 +20,37 @@ user@host:~$ sudo pacman -S python-pip
user@host:~$ sudo pacman -S ffmpeg user@host:~$ sudo pacman -S ffmpeg
user@host:~$ sudo pacman -S npm user@host:~$ sudo pacman -S npm
user@host:~$ sudo pip install virtualenv user@host:~$ sudo pip install virtualenv
```
Apt (Working with Ubuntu 24.04 Noble, untested on others versions) - assumes that you are **using VM only for szurubooru**, so there is no problem with any system-wide install.
```console
# Import the repository signing key:
sudo apt install curl ca-certificates
sudo install -d /usr/share/postgresql-common/pgdg
sudo curl -o /usr/share/postgresql-common/pgdg/apt.postgresql.org.asc --fail https://www.postgresql.org/media/keys/ACCC4CF8.asc
# Create the repository configuration file:
sudo sh -c 'echo "deb [signed-by=/usr/share/postgresql-common/pgdg/apt.postgresql.org.asc] https://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
# Update the package lists:
user@host:~$ sudo apt update
# Install the latest version of PostgreSQL:
# If you want a specific version, use 'postgresql-16' or similar instead of 'postgresql'
sudo apt -y install postgresql
sudo apt -y install python3
sudo apt -y install python3-pip
sudo apt -y install ffmpeg
sudo apt -y install python3-virtualenv python3-yaml python3-psycopg2 python3-sqlalchemy python3-certifi python3-numpy python3-pillow python3-tz python3-rfc3339 python3-nacl python3-alembic python3-pytest python3-pytest-cov
sudo apt -y install libheif-dev
sudo apt -y install libavif-dev
mv /usr/lib/python3.12/EXTERNALLY-MANAGED /usr/lib/python3.12/EXTERNALLY-MANAGED.old
pip3 install pyheif
pip3 install heif-image-plugin
pip3 install yt-dlp
pip3 install pillow-avif-plugin
pip3 install freezegun
``` ```
@ -63,6 +96,8 @@ Installing frontend dependencies:
user@host:szuru$ cd client user@host:szuru$ cd client
user@host:szuru/client$ npm install user@host:szuru/client$ npm install
``` ```
(@dante4 - my advice run npm audit fix, it shouldn't break anything, but at least fix a few critical vulnerabilities.)
(In case you are used Apt method you may skip below)
`npm` sandboxes dependencies by default, i.e. installs them to `npm` sandboxes dependencies by default, i.e. installs them to
`./node_modules`. This is good, because it avoids polluting the system with the `./node_modules`. This is good, because it avoids polluting the system with the
@ -70,6 +105,7 @@ project's dependencies. To make Python work the same way, we'll use
`virtualenv`. Installing backend dependencies with `virtualenv` looks like `virtualenv`. Installing backend dependencies with `virtualenv` looks like
this: this:
```console ```console
user@host:szuru/client$ cd ../server user@host:szuru/client$ cd ../server
user@host:szuru/server$ virtualenv python_modules # consistent with node_modules user@host:szuru/server$ virtualenv python_modules # consistent with node_modules