32 lines
652 B
Plaintext
Executable File
32 lines
652 B
Plaintext
Executable File
#!/sbin/openrc-run
|
|
|
|
description="OpenDataKit Aggregate docker container"
|
|
|
|
depend() {
|
|
need docker postfix postgres
|
|
}
|
|
|
|
start() {
|
|
/usr/bin/docker run -d --rm \
|
|
--name odk \
|
|
-h odk \
|
|
--link postfix \
|
|
--link postgres \
|
|
-v /srv/odk/conf/server.xml:/srv/tomcat/conf/server.xml \
|
|
-v /srv/odk/conf/jdbc.properties:/srv/tomcat/webapps/aggregate/WEB-INF/classes/jdbc.properties \
|
|
-v /srv/odk/conf/security.properties:/srv/tomcat/webapps/aggregate/WEB-INF/classes/security.properties \
|
|
odk
|
|
}
|
|
|
|
start_post() {
|
|
/usr/bin/spotter-appmgr register-proxy odk
|
|
}
|
|
|
|
stop_pre() {
|
|
/usr/bin/spotter-appmgr unregister-proxy odk
|
|
}
|
|
|
|
stop() {
|
|
/usr/bin/docker stop odk
|
|
}
|