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

27 lines
592 B
Plaintext
Executable File

#!/sbin/openrc-run
description="Sahana Eden docker container"
depend() {
need docker net
use dns logger netmount
after postgres
}
start() {
/usr/bin/docker run -d --rm \
--name sahana \
-h sahana \
--link postgres \
-p 127.0.0.1:9001:8001 \
-v /srv/sahana/conf:/srv/web2py/applications/eden/models \
-v /srv/sahana/data/Spotter:/srv/web2py/applications/eden/modules/templates/Spotter \
-v /srv/sahana/data/databases:/srv/web2py/applications/eden/databases \
-v /srv/sahana/data/uploads:/srv/web2py/applications/eden/uploads \
sahana
}
stop() {
/usr/bin/docker stop sahana
}