Skip to content

Instantly share code, notes, and snippets.

@hoozecn
Created February 1, 2022 20:54
Show Gist options
  • Save hoozecn/c108d63c08c752817cd2d8afb4c99a17 to your computer and use it in GitHub Desktop.
Save hoozecn/c108d63c08c752817cd2d8afb4c99a17 to your computer and use it in GitHub Desktop.
podman postgres/redis service
# container-postgres.service
# autogenerated by Podman 3.4.2
# Tue Feb 1 20:19:43 UTC 2022
[Unit]
Description=Podman container-postgres.service
Documentation=man:podman-generate-systemd(1)
Wants=network-online.target
After=network-online.target
RequiresMountsFor=%t/containers
[Service]
Environment=PODMAN_SYSTEMD_UNIT=%n
Restart=always
TimeoutStopSec=70
ExecStartPre=/bin/rm -f %t/%n.ctr-id
ExecStart=/usr/bin/podman run --cidfile=%t/%n.ctr-id --cgroups=no-conmon --rm --sdnotify=conmon -d --replace --name postgres -e POSTGRES_PASSWORD=postgres -p 5432:5432 -v postgres:/var/lib/postgresql/data postgres:9.6.24-bullseye
ExecStop=/usr/bin/podman stop --ignore --cidfile=%t/%n.ctr-id
ExecStopPost=/usr/bin/podman rm -f --ignore --cidfile=%t/%n.ctr-id
Type=notify
NotifyAccess=all
[Install]
WantedBy=default.target
# container-redis.service
# autogenerated by Podman 3.4.2
# Tue Feb 1 20:19:43 UTC 2022
[Unit]
Description=Podman container-redis.service
Documentation=man:podman-generate-systemd(1)
Wants=network-online.target
After=network-online.target
RequiresMountsFor=%t/containers
[Service]
Environment=PODMAN_SYSTEMD_UNIT=%n
Restart=always
TimeoutStopSec=70
ExecStartPre=/bin/rm -f %t/%n.ctr-id
ExecStart=/usr/bin/podman run --cidfile=%t/%n.ctr-id --cgroups=no-conmon --rm --sdnotify=conmon -d --replace --name redis -p 6379:6379 -v /home/services/services/redis/redis.conf:/redis.conf -v redis:/data redis:6 redis-server /redis.conf
ExecStop=/usr/bin/podman stop --ignore --cidfile=%t/%n.ctr-id
ExecStopPost=/usr/bin/podman rm -f --ignore --cidfile=%t/%n.ctr-id
Type=notify
NotifyAccess=all
[Install]
WantedBy=default.target
databases 256
notify-keyspace-events AKE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment