herzenschein / herz-quadlet

A repository where I store my podman quadlets.
9 stars 0 forks source link

thanks for publishing these - a couple tweaks for gitea #2

Open mrguitar opened 2 months ago

mrguitar commented 2 months ago

This may not be relevant to your setup, but I had to make three changes to get this quadlet working.

Notify=true was causing systemd start to not finish and restarting the container every 2-5 min (i can't remember what the timeout was). The rootless container will listen on 2222 by default, but their regular one is on 22. I tweaked that on mine to run on 22 but keep the host on 2222. Finally the image has a Volume in it for /data. I realized that gitea-data volume path you had wasn't being used and the image is expecting to mount under /data. Easy fix and now the data persists as expected.

YMMV!

[Container] Image=docker.io/gitea/gitea ContainerName=gitea AutoUpdate=registry

Notify=true

PublishPort=3000:3000 PublishPort=2222:22 Volume=gitea-data:/data:Z Volume=gitea-config:/etc/gitea:Z

herzenschein commented 3 weeks ago

Oh yes, I actually reverted the sdnotify changes recently because of that. I want to at some point test all of those containers individually to only add sdnotify where it works, so good to know that it doesn't work with gitea.

I didn't notice the /data folder thing. I see the official docs seem to use /data for their rootful container and /var/lib/gitea for their rootless container. Since this repo is more focused on rootless podman, I'll probably just switch it to the rootless image which should work with /var/lib/gitea.

herzenschein commented 2 weeks ago

Another difference: it seems the rootful container defaults to 22 while the rootless container defaults to 2222! This is honestly very easy to miss, but at least it is also fixed by changing the image to be rootless.

Just in case, I also made 86b75a1.