coreos-home-server/config/service/redis/systemd/redis.service

17 lines
661 B
SYSTEMD
Raw Normal View History

[Unit]
Description=Redis Key-Value Store
Wants=container-build@%N.service container-network@%N.service container-network@internal.service
After=container-build@%N.service container-network@%N.service container-network@internal.service
[Service]
Restart=always
ExecStartPre=/bin/install --owner 999 --group 1000 -d /var/lib/container-service/%N
ExecStart=/bin/podman run --replace --pull never --net internal,%N \
--volume /var/lib/container-service/%N:/data:z \
--name %N localhost/%N:latest
ExecStop=/bin/podman stop --time 10 %N
ExecStopPost=/bin/podman rm --force %N
[Install]
WantedBy=multi-user.target