2017-12-19 22:17:12 +01:00
|
|
|
#!/sbin/openrc-run
|
|
|
|
|
|
|
|
description="CKAN docker container"
|
|
|
|
|
|
|
|
depend() {
|
2017-12-20 22:45:49 +01:00
|
|
|
need docker net
|
2018-01-30 16:34:29 +01:00
|
|
|
use dns logger netmount postfix
|
2017-12-20 22:45:49 +01:00
|
|
|
after postgres redis solr ckan-datapusher
|
2017-12-19 22:17:12 +01:00
|
|
|
}
|
|
|
|
|
2017-12-20 11:05:54 +01:00
|
|
|
start_pre() {
|
|
|
|
/srv/ckan/update-ip.sh
|
|
|
|
}
|
|
|
|
|
2017-12-19 22:17:12 +01:00
|
|
|
start() {
|
2018-01-27 14:08:19 +01:00
|
|
|
/usr/bin/docker run -d --rm \
|
|
|
|
--name ckan \
|
|
|
|
-h ckan \
|
2018-01-30 16:34:29 +01:00
|
|
|
--link ckan-datapusher \
|
|
|
|
--link postfix \
|
2018-01-27 14:08:19 +01:00
|
|
|
--link postgres \
|
|
|
|
--link redis \
|
|
|
|
--link solr \
|
|
|
|
--link ckan-datapusher \
|
2018-02-01 14:55:24 +01:00
|
|
|
-p 127.0.0.1:8003:8003 \
|
2018-01-27 14:08:19 +01:00
|
|
|
-v /srv/ckan/conf:/etc/ckan \
|
|
|
|
-v /srv/ckan/data:/srv/ckan/storage \
|
|
|
|
ckan
|
2017-12-19 22:17:12 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
stop() {
|
|
|
|
/usr/bin/docker stop ckan
|
|
|
|
}
|