#!/sbin/openrc-run

description="CKAN docker container"

depend() {
	need docker net postgres redis solr
	use dns logger netmount
}

start_pre() {
	/srv/ckan/update-ip.sh
}

start() {
	/usr/bin/docker run -d --rm --name ckan --link=postgres --link=redis --link=solr -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
}
