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

31 lines
647 B
Plaintext
Executable File

#!/sbin/openrc-run
description="SAMBRO docker container"
depend() {
need docker net postgres
use dns logger netmount postfix
}
start_pre() {
/srv/sambro/update-ip.sh
}
start() {
/usr/bin/docker run -d --rm \
--name sambro \
-h sambro \
--link postfix \
--link postgres \
-p 127.0.0.1:8099:8001 \
-v /srv/sambro/conf:/srv/web2py/applications/eden/models \
-v /srv/sambro/data/SAMBRO:/srv/web2py/applications/eden/modules/templates/SAMBRO \
-v /srv/sambro/data/databases:/srv/web2py/applications/eden/databases \
-v /srv/sambro/data/uploads:/srv/web2py/applications/eden/uploads \
sahana
}
stop() {
/usr/bin/docker stop sambro
}