Use docker stop in systemd services
This commit is contained in:
parent
4c05a03f93
commit
b3b8aeaedb
@ -6,7 +6,8 @@ After=network-online.target
|
|||||||
[Service]
|
[Service]
|
||||||
Restart=on-failure
|
Restart=on-failure
|
||||||
TimeoutStopSec=70
|
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
|
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
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target default.target
|
WantedBy=multi-user.target default.target
|
||||||
|
@ -6,7 +6,8 @@ After=network-online.target container-postgres.service
|
|||||||
[Service]
|
[Service]
|
||||||
Restart=on-failure
|
Restart=on-failure
|
||||||
TimeoutStopSec=70
|
TimeoutStopSec=70
|
||||||
ExecStart=/usr/bin/docker run --pull=always --rm -it --name saucy --env-file /srv/saucy/env -v /srv/saucy/data:/data -p80:3000 git.ansol.org/ansol/saucy:latest
|
ExecStart=/usr/bin/docker run --pull=always --rm --name saucy --env-file /srv/saucy/env -v /srv/saucy/data:/data -p80:3000 git.ansol.org/ansol/saucy:latest
|
||||||
|
ExecStop=/usr/bin/docker stop saucy
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target default.target
|
WantedBy=multi-user.target default.target
|
||||||
|
Loading…
Reference in New Issue
Block a user