Tips buat yang jalanin #container terutama menggunakan #podman dan #quadlet.
Jika container tersebut butuh konsistensi data pada storage, misalnya database, biasanya untuk memberhentikan container itu butuh waktu yang cukup lama karena container tersebut akan melakukan "bersih-bersih" terlebih dahulu.
Timeout default saat stop container quadlet adalah 10 detik (yang merupakan default dari podman). Seringkali ini tidaklah cukup. Jika diabaikan, aplikasi di container tersebut akan diterminasi paksa sebelum dia selesai bersih-bersih.
Agar tidak di-terminasi paksa jika lebih dari 10 detik, naikkan batas timeout misal menjadi 120 detik (atau nilai lain yang dianggap wajar).
Caranya cukup edit file quadlet anda:
[Container]
...
...
...
PodmanArgs=--stop-timeout 120
...
...
...
[Service]
...
...
...
TimeoutStopSec=120
...
...
...
Catatan, [Container] dan [Service] tidak perlu anda ketik ulang, karena biasanya sudah ada di file quadlet tersebut. "..." juga hanya sebagai ilustrasi saja, tidak perlu anda ketik ulang.
Mengapa butuh dua baris tersebut, di [Container] dan juga [Service]?
Pada section --stop-timeout= pada section [Container] itu fungsinya untuk memberitahu podman bahwa batas timeout adalah 120 detik.
Sedangkan TimeoutStopSec= pada section [Service] untuk menaikkan batas timeout #systemd ketika menunggu podman selesai melakukan terminasi.
Jadi pada [Container] itu untuk timeout podman menunggu aplikasi selesai. Sedangkan pada [Service] untuk timeout systemd menunggu podman selesai.
You might have noticed that I have spend some time in my Quadlets Repo, taking care of some Grafana stuff.
Took me a bit to understand it but I’m quite happy with the result.
Check it out if you’d like to deploy your Grafana instance with a few extras in your homelab!
#git #codeberg #monitoring #grafana #prometheus #NodeExporter #podmanexporter #tailscale #tailscaleexporter #podman #quadlet #quadlets #rootless

Containers are an essential skill for every Sysadmin. Red Hat's Podman makes this easy and secure with rootless Containers. But a normal container or Compose needs to be started manually, Quadlets change that. Use my presents and convert them into SystemD Services with the Wiki Page I wrote.
Out of boredom, I thought why not give the Zammad Quadlets another try.
Originally, I planned to work on them next month but I just couldn’t resist.
And would you look at that, adding two more variables to the nginx container fixed the problem.
Now the Quadlets are working like a charm, meaning I need a new project for next month.
The wiki will probably be finished by the end of this week.
Check them out and give them a try by cloning my codeberg repo!
https://codeberg.org/Spoljarevic/Zammad-Podman-Quadlets/src/branch/master
#podman #quadlets #quadlet #podmanquadlets #coding #troubleshooting #codeberg #dns #repo #zammad #ticket #tickets #ticketsystem
How do I use journalctl from the root account to tail logs of a service running as a user ? I am using #podman #quadlets to manage containers using #systemd btw
Doing this:
journalctl --user --machine=containeruser@ -xeu helloworld.service
Gives me this error:
Failed to open root directory of machine 'containeruser@': No machine 'containeruser@' known
Failed to open journal: No such device or address
help!?
A reminder to always RTFM (read the friendly manual of course).
I spend about an hour trying to get a Quadlet work.
After that I decided to go into the Arch wiki and would you look at that, there was this one single command that was missing in order to validate the Quadlet…
I felt so stupid but my first .container file is up in my Quadlet Repo on Codeberg and I made a slim documentation for it (also linked the Arch Wiki there).
Took way longer than needed but I hope you enjoy!

Containers are an essential skill for every Sysadmin. Red Hat's Podman makes this easy and secure with rootless Containers. But a normal container or Compose needs to be started manually, Quadlets change that. Use my presents and convert them into SystemD Services with the Wiki Page I wrote.
Dear #mastoadmins, I'd like to improve the current setup using #caddy and #podman #compose. Is anyone using #podman #quadlet with #systemd? Also I understand that having the connection between caddy reverse proxy and mastodon via sockets is very cool and I'd like to give this a try as well.
Systemd is now offering keeping podman quadlet containers up to date by itself. Maybe this one can be leveraged as well.