2018-01-27 22:26:37 +01:00
|
|
|
#!/sbin/openrc-run
|
|
|
|
|
|
|
|
description="Sahana Eden docker container"
|
|
|
|
|
|
|
|
depend() {
|
2018-04-29 20:48:57 +02:00
|
|
|
need docker postfix postgres
|
2018-01-27 22:26:37 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
start() {
|
|
|
|
/usr/bin/docker run -d --rm \
|
|
|
|
--name sahana \
|
|
|
|
-h sahana \
|
2018-02-03 13:42:32 +01:00
|
|
|
--link postfix \
|
2018-01-27 22:26:37 +01:00
|
|
|
--link postgres \
|
|
|
|
-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
|
|
|
|
}
|
|
|
|
|
2018-03-25 23:19:45 +02:00
|
|
|
start_post() {
|
2018-09-04 21:42:26 +02:00
|
|
|
/usr/bin/vmmgr register-proxy sahana
|
2018-04-29 20:48:57 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
stop_pre() {
|
2018-09-04 21:42:26 +02:00
|
|
|
/usr/bin/vmmgr unregister-proxy sahana
|
2018-03-25 23:19:45 +02:00
|
|
|
}
|
|
|
|
|
2018-01-27 22:26:37 +01:00
|
|
|
stop() {
|
|
|
|
/usr/bin/docker stop sahana
|
|
|
|
}
|