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

32 lines
483 B
Plaintext
Executable File

#!/sbin/openrc-run
description="CKAN docker container"
depend() {
need docker net
use dns logger netmount
after postgres redis solr ckan-datapusher
}
start_pre() {
/srv/ckan/update-ip.sh
}
start() {
/usr/bin/docker run -d --rm \
--name ckan \
-h ckan \
--link postgres \
--link redis \
--link solr \
--link ckan-datapusher \
-p 127.0.0.1:9003:8003 \
-v /srv/ckan/conf:/etc/ckan \
-v /srv/ckan/data:/srv/ckan/storage \
ckan
}
stop() {
/usr/bin/docker stop ckan
}