You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This post is to discuss how I used podman quadlet to setup the container+systemd support of invidious.
I first integrated invidious through its container form. The docker-file/docker-compose material provided within the project is great and allowed a quite straight forward integration.
Next step was to fully integrate the service within my host, meaning:
starting/stopping the containers at boot/halt of the host.
regularly restarting the invidious container as mentioned in the documentation (memory leaks).
My container ecosystem being Podman, I decided to use a quite new tool for running Podman containers under systemd: quadlet. With quadlet, you describe how to run a container in a format that is very similar to regular systemd unit files. Resulting service files are then crunched by systemd as any other service files. I also used an intermediate tool named podlet. Podlet automatically generates quadlet files from different inputs, including a docker-compose file.
Transformation :
(podman-compose + invidious docker compose file) → (systemd + quadlet files)
using podlet to generate the output quadlet data from the input invidious docker compose file.
The transformation needed some small troubleshooting:
Podlet preprocessing:
Docker/podman compose performs some hidden tricks that are not straight forward translated in “the quadlet world”. Concerning invidious, I had to investigate network related problems , solved by modifying the input compose file :
to explicit the internal network between the two containers (invidious and invidious-db).
to explicit the invidious-db container hostname (used by the invidious container to connect to the db).
This generates 3 files, one for each container (invidious, invidious-db) plus one for the network, files directly understood by systemd (but a “systemctl reload”) when placed under $HOME/.config/containers/systemd/ (podman rootless use case).
Podlet postprocessing:
I instructed systemd to stop the invidious container every hour by editing the invidious container quadlet file.
invidious.container quadlet file :
[Service]
Restart=always RuntimeMaxSec=3600
Doing so, systemd will stop the container every hour and because of the existing Restart=always directive, systemd will restart the service as soon as it it stopped = effective restart of the container every hour.
Et voila. I now have a invidious service supported by an effective container+systemd combo.
Thanks to the invidious authors and contributors. This project is awesome.
The text was updated successfully, but these errors were encountered:
@frotinybo Greetings! I've been trying to achieve the same setup (Invidious + Quadlet). Would you kindly share your configuration files so we can understand how to structure/replicate in our environments? Thank you in advance!
Hello,
This post is to discuss how I used podman quadlet to setup the container+systemd support of invidious.
I first integrated invidious through its container form. The docker-file/docker-compose material provided within the project is great and allowed a quite straight forward integration.
Next step was to fully integrate the service within my host, meaning:
My container ecosystem being Podman, I decided to use a quite new tool for running Podman containers under systemd: quadlet. With quadlet, you describe how to run a container in a format that is very similar to regular systemd unit files. Resulting service files are then crunched by systemd as any other service files. I also used an intermediate tool named podlet. Podlet automatically generates quadlet files from different inputs, including a docker-compose file.
Transformation :
(podman-compose + invidious docker compose file) → (systemd + quadlet files)
using podlet to generate the output quadlet data from the input invidious docker compose file.
The transformation needed some small troubleshooting:
Podlet preprocessing:
Docker/podman compose performs some hidden tricks that are not straight forward translated in “the quadlet world”. Concerning invidious, I had to investigate network related problems , solved by modifying the input compose file :
invidious docker-compose.yml :
services:
...
invidious:
...
networks:
- invidious-net
…
invidious-db:
…
hostname: invidious-db
networks:
- invidious-net
...
networks:
invidious-net:
Podlet processing (tool version 0.2.2)
“mkdir podletdir”
“podlet --overwrite --file podletdir --install compose docker-compose.yml”
This generates 3 files, one for each container (invidious, invidious-db) plus one for the network, files directly understood by systemd (but a “systemctl reload”) when placed under $HOME/.config/containers/systemd/ (podman rootless use case).
Podlet postprocessing:
I instructed systemd to stop the invidious container every hour by editing the invidious container quadlet file.
invidious.container quadlet file :
[Service]
Restart=always
RuntimeMaxSec=3600
Doing so, systemd will stop the container every hour and because of the existing Restart=always directive, systemd will restart the service as soon as it it stopped = effective restart of the container every hour.
Et voila. I now have a invidious service supported by an effective container+systemd combo.
Thanks to the invidious authors and contributors. This project is awesome.
The text was updated successfully, but these errors were encountered: