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

32 lines
491 B
Plaintext
Executable File

#!/sbin/openrc-run
description="CKAN docker container"
depend() {
need docker net postgres
use dns logger netmount postfix
after ckandp redis solr
}
start() {
/usr/bin/docker run -d --rm \
--name ckan \
-h ckan \
--link ckandp \
--link postfix \
--link postgres \
--link redis \
--link solr \
-v /srv/ckan/conf:/etc/ckan \
-v /srv/ckan/data:/srv/ckan/storage \
ckan
}
start_post() {
/usr/local/bin/spotter-appmgr update-hosts ckan
}
stop() {
/usr/bin/docker stop ckan
}