Spotter-VM/ckan-datapusher.sh

16 lines
581 B
Bash
Raw Normal View History

2018-04-21 22:38:30 +02:00
#!/bin/sh
set -e
2018-04-21 22:38:30 +02:00
SOURCE_DIR=$(realpath $(dirname "${0}"))/ckan-datapusher
# 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