[Unit]
Description=OpenTogetherTube Redis

[Container]
ContainerName=ott-redis
Image=docker.io/library/redis:7-alpine
Network=ott.network
# Run as the in-image redis uid/gid (999) and let Podman chown the bind-mount
# source to the matching mapped host uid (:U). Without this, redis-server drops
# to the redis user but /data stays root-owned in the userns, so RDB saves fail
# with EPERM.
User=999:999
Volume=/home/ott/data/redis:/data:U
HealthCmd=redis-cli ping

[Service]
Restart=on-failure

[Install]
WantedBy=default.target
