2018-01-24 15:18:55 +01:00
|
|
|
#!/sbin/openrc-run
|
|
|
|
|
|
|
|
description="Ushahidi docker container"
|
|
|
|
|
|
|
|
depend() {
|
2018-04-29 20:48:57 +02:00
|
|
|
need docker mariadb postfix
|
2018-01-24 15:18:55 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
start() {
|
2018-01-27 14:08:19 +01:00
|
|
|
/usr/bin/docker run -d --rm \
|
|
|
|
--name ushahidi \
|
|
|
|
-h ushahidi \
|
|
|
|
--link mariadb \
|
2018-02-03 10:06:16 +01:00
|
|
|
--link postfix \
|
2018-01-27 14:35:16 +01:00
|
|
|
-v /srv/ushahidi/conf/env:/srv/ushahidi/platform/.env \
|
2018-02-20 20:57:04 +01:00
|
|
|
-v /srv/ushahidi/conf/config.json:/srv/ushahidi/config.json \
|
2018-02-02 20:16:26 +01:00
|
|
|
-v /srv/ushahidi/data:/srv/ushahidi/platform/application/media/uploads \
|
2018-01-27 14:08:19 +01:00
|
|
|
ushahidi
|
2018-01-24 15:18:55 +01:00
|
|
|
}
|
|
|
|
|
2018-03-25 23:21:54 +02:00
|
|
|
start_post() {
|
2018-04-29 20:48:57 +02:00
|
|
|
/usr/bin/spotter-appmgr register-proxy ushahidi
|
|
|
|
}
|
|
|
|
|
|
|
|
stop_pre() {
|
|
|
|
/usr/bin/spotter-appmgr unregister-proxy ushahidi
|
2018-03-25 23:21:54 +02:00
|
|
|
}
|
|
|
|
|
2018-01-24 15:18:55 +01:00
|
|
|
stop() {
|
|
|
|
/usr/bin/docker stop ushahidi
|
|
|
|
}
|