Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a guide for using podman quadlet files #103

Closed
madscientist16 opened this issue Oct 24, 2024 · 6 comments
Closed

Add a guide for using podman quadlet files #103

madscientist16 opened this issue Oct 24, 2024 · 6 comments

Comments

@madscientist16
Copy link
Contributor

I think it would be nice to have a guide with example quadlet files for people using podman.

Here's some examples based on the quadlet files I use to run komga and komf.

komga.pod

# Run komga and komf in a pod to make networking easier when running as rootless. 
# Komf can communicate with komga using localhost:25600 when both are running inside the same pod.

[Pod]
# Komf
PublishPort=8085:8085
# Komga
PublishPort=25600:25600

komga.container

[Unit]
Description=Komga - Media server for comics & mangas

[Container]
## General
# AutoUpdate=registry allows this container to be updated using podman auto-update command
AutoUpdate=registry
Image=docker.io/gotson/komga:latest
Pod=komga.pod

## Volumes
# %h is a shortcut for the home directory 
Volume=%h/Server/komga-pod/komga:/config
Volume=%h/Documents/Books:/data

## Environment Variables
Environment="TZ=Your/Timezone"
Environment="JAVA_TOOL_OPTIONS=-Xmx4g"

[Service]
SuccessExitStatus=0 143

See this post for the reason for adding 143 as a success exit code

komf.container

[Unit]
Description=Komf - Komga & Kavita Metadata Fetcher
After=komga.service

[Container]
# General
AutoUpdate=registry
Image=docker.io/sndxr/komf:latest
Pod=komga.pod

# Volumes
Volume=%h/Server/komga-pod/komf:/config

# Environment Variables
Environment="TZ=Your/Timezone"
Environment="KOMF_KOMGA_BASE_URI=http://localhost:25600"
Environment="[email protected]"
Environment="JAVA_TOOL_OPTIONS=-XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=compact -XX:ShenandoahGuaranteedGCInterval=3600000 -XX:TrimNativeHeapInterval=3600000"
# See link below on how to create podman secrets.
Secret=komga_password,type=env,target=KOMF_KOMGA_PASSWORD

[Service]
# Add 143 for the same reason as komga
SuccessExitStatus=0 143

See this page for how to create podman secrets.

I have all three files above in ~/.config/containers/systemd/komga directory. Then I run systemctl --user daemon-reload to generate the systemd services from the quadlet files. After that I just start the komga-pod.service with systemctl --user start komga-pod.service. If I wanted to start the komga pod when I boot up the server I could add the following to komga.pod

[Install]
WantedBy=default.target
@gotson
Copy link
Owner

gotson commented Oct 24, 2024

i have no experience with Podman, and no time to verify any of this information.

One way would be to add a community guide under https://komga.org/docs/community and we could reference that from https://komga.org/docs/installation/docker

what do you think ?

@gotson
Copy link
Owner

gotson commented Oct 24, 2024

or if you maintain this information somewhere (gist or github repo) we could just add a link in https://komga.org/docs/community

@madscientist16
Copy link
Contributor Author

That seems reasonable. Also should note that the podman version that works with the quadlet files should also be mentioned with the guide since it works differently for different versions.

@gotson
Copy link
Owner

gotson commented Oct 24, 2024

do you want to take a dab at a PR ?

you can start by just creating a simple md file in website/docs/community, and i can contribute on your PR to adjust the Community section.

I think it would make sense to have a first section explaining how to run Komga only, and maybe a second one bundling Komga and Komf ?

@madscientist16
Copy link
Contributor Author

Yeah I'll try making a PR. I agree a section for just running komga first seems like a good idea.

@madscientist16
Copy link
Contributor Author

I've made a PR at #104. Let me know if there's anything I could do to improve it.

@gotson gotson closed this as completed in 569cbd3 Oct 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants