2017-12-20 15:41:29 +01:00
|
|
|
#!/bin/sh
|
|
|
|
|
2017-12-21 10:43:54 +01:00
|
|
|
SOURCE_DIR=$(realpath $(dirname "${0}"))/ckan-datapusher
|
2017-12-20 15:41:29 +01:00
|
|
|
|
|
|
|
# Build Docker container
|
|
|
|
docker build -t ckan-datapusher ${SOURCE_DIR}
|
|
|
|
|
|
|
|
# Configure CKAN DataPusher
|
2018-01-15 20:06:06 +01:00
|
|
|
mkdir -p /srv/ckan-datapusher/conf /srv/ckan-datapusher/data
|
2017-12-20 15:41:29 +01:00
|
|
|
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
|
|
|
|
|
|
|
|
# Configure CKAN DataPusher service
|
|
|
|
cp ${SOURCE_DIR}/etc/init.d/ckan-datapusher /etc/init.d/ckan-datapusher
|
|
|
|
rc-update add ckan-datapusher boot
|
|
|
|
service ckan-datapusher start
|
|
|
|
|
|
|
|
# Create nginx app definition
|
|
|
|
cp ${SOURCE_DIR}/etc/nginx/conf.d/ckan-datapusher.conf /etc/nginx/conf.d/ckan-datapusher.conf
|
|
|
|
service nginx reload
|