Spotter-VM/postgres/etc/init.d/postgres

21 lines
292 B
Plaintext
Raw Normal View History

2017-12-19 13:53:30 +01:00
#!/sbin/openrc-run
description="Postgres docker container"
depend() {
need docker net
use dns logger netmount
}
start() {
/usr/bin/docker run -d --rm \
--name postgres \
-h postgres \
2018-01-27 14:44:44 +01:00
-v /srv/postgres/data:/var/lib/postgresql \
postgres
2017-12-19 13:53:30 +01:00
}
stop() {
/usr/bin/docker stop postgres
}