From 28af281af9ae8545ca965daa410febf8ecf0f6c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Zapletal?= Date: Sun, 29 Sep 2024 20:48:02 +0200 Subject: [PATCH] Add podman quadlet installation method (#602) Signed-off-by: Lukas Zapletal --- docs/community-installation-guide.md | 110 +++++++++++++++++++++++++++ 1 file changed, 110 insertions(+) diff --git a/docs/community-installation-guide.md b/docs/community-installation-guide.md index 811fc3a..b205004 100644 --- a/docs/community-installation-guide.md +++ b/docs/community-installation-guide.md @@ -99,3 +99,113 @@ loginctl enable-linger podman auto-update podman image prune -f ``` + +## Podman via systemd + +This method is suitable for systems which come with Podman version 5.x or higher and systemd (e.g. Fedora, CentOS Stream 9 or clones). Instructions are written for root-less mode, do not run the commands as root since paths are different. Ensure that SELinux is in enforcing mode for maximum security. + +Create a new volume for database: + + podman volume create invidious-db + +Start a temporary container: + + podman run --rm -it --name invidious-init -v invidious-db:/var/lib/postgresql/data:Z -p 5432:5432 -e POSTGRES_DB=invidious -e POSTGRES_USER=kemal -e POSTGRES_PASSWORD=kemal docker.io/library/postgres:14 + +In another terminal, migrate the database: + + export PGPASSWORD=kemal + for F in channels videos channel_videos users session_ids nonces annotations playlists playlist_videos; do + curl -s https://raw.githubusercontent.com/iv-org/invidious/refs/heads/master/config/sql/$F.sql | \ + psql -h localhost -p 5432 -U kemal invidious + done + +Shutdown the temporary container, it is no longer needed. Create a database volume unit: + + cat > ~/.config/containers/systemd/invidious-db.volume < ~/.config/containers/systemd/invidious-db.container < ~/.config/containers/systemd/invidious-sig-helper.container < ~/.config/containers/systemd/invidious.env < ~/.config/containers/systemd/invidious.container < ~/.config/containers/systemd/invidious.pod <