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

21 lines
292 B
Plaintext
Executable File

#!/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 \
-v /srv/postgres/data:/var/lib/postgresql \
postgres
}
stop() {
/usr/bin/docker stop postgres
}