2018-04-21 22:38:30 +02:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
SOURCE_DIR=$(realpath $(dirname "${0}"))/ckan-datapusher
|
|
|
|
|
2018-04-30 22:57:50 +02:00
|
|
|
# Check prerequisites
|
|
|
|
docker image ls | grep -q python2 || $(realpath $(dirname "${0}"))/python2.sh
|
|
|
|
|
2018-04-21 22:38:30 +02:00
|
|
|
# Build Docker container
|
|
|
|
docker build -t ckan-datapusher ${SOURCE_DIR}
|
|
|
|
cp ${SOURCE_DIR}/etc/init.d/ckan-datapusher /etc/init.d/ckan-datapusher
|
|
|
|
rc-update -u
|
|
|
|
|
|
|
|
# Configure CKAN DataPusher
|
|
|
|
mkdir -p /srv/ckan-datapusher/conf /srv/ckan-datapusher/data
|
|
|
|
cp ${SOURCE_DIR}/srv/ckan-datapusher/conf/datapusher.wsgi /srv/ckan-datapusher/conf/datapusher.wsgi
|
|
|
|
cp ${SOURCE_DIR}/srv/ckan-datapusher/conf/datapusher_settings.py /srv/ckan-datapusher/conf/datapusher_settings.py
|
|
|
|
chown -R 8004:8004 /srv/ckan-datapusher/data
|