ansible/roles/container-postgres/files/unit.service

13 lines
355 B
SYSTEMD
Raw Normal View History

[Unit]
Description=Container running postgres
Wants=network.target
After=network-online.target
[Service]
Restart=on-failure
TimeoutStopSec=70
ExecStart=/usr/bin/docker run --rm -it --name postgres --env-file /srv/postgres/env -v /srv/postgres/data:/var/lib/postgresql/data -p5432:5432 postgres:latest
[Install]
WantedBy=multi-user.target default.target