Quadlet example: single container with volume

From wikinotes

1. Configurations

First, add the configs:

ntfy.container

# ~/.config/containers/systemd/ntfy.container
# vim: ft=systemd
[Install]
WantedBy=default.target

[Container]
# https://hub.docker.com/r/binwiederhier/ntfy/tags
Image=docker.io/binwiederhier/ntfy:2.11.0
Volume=ntfy.volume:/etc/ntfy
Environment=TZ=UTC
PublishPort=127.0.0.1:9800:80
EntryPoint=["ntfy", "serve"]

ntfy.volume

# ~/.config/containers/systemd/ntfy.volume
# vim: ft=systemd
[Volume]

2. Regen systemd and boot container

# check for errors in systemd-generation
/usr/libexec/podman/quadlet -dryrun -user

# regenerate service
systemctl --user daemon-reload
systemctl --user start ntfy.service

# debugging
systemctl --user status ntfy.service  # check, try running the 'ExecStart' command