2022-10-01 23:10:14 +00:00
|
|
|
[Unit]
|
|
|
|
Description=Container running postgres
|
|
|
|
Wants=network.target
|
|
|
|
After=network-online.target
|
|
|
|
|
|
|
|
[Service]
|
|
|
|
Restart=on-failure
|
|
|
|
TimeoutStopSec=70
|
2022-10-02 12:16:47 +00:00
|
|
|
ExecStart=/usr/bin/docker run --rm --name postgres --env-file /srv/postgres/env -v /srv/postgres/data:/var/lib/postgresql/data -p5432:5432 postgres:latest
|
|
|
|
ExecStop=/usr/bin/docker stop postgres
|
2022-10-01 23:10:14 +00:00
|
|
|
|
|
|
|
[Install]
|
|
|
|
WantedBy=multi-user.target default.target
|