2017-12-19 13:53:30 +01:00
|
|
|
#!/sbin/openrc-run
|
|
|
|
|
|
|
|
description="Postgres docker container"
|
|
|
|
|
|
|
|
depend() {
|
|
|
|
need docker net
|
|
|
|
use dns logger netmount
|
|
|
|
}
|
|
|
|
|
|
|
|
start() {
|
2018-01-27 14:08:19 +01:00
|
|
|
/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 \
|
2018-01-27 14:08:19 +01:00
|
|
|
postgres
|
2017-12-19 13:53:30 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
stop() {
|
|
|
|
/usr/bin/docker stop postgres
|
|
|
|
}
|