Steps to Setup CLIxDataRepository - Pardhu448/clix_datarepository_ckan GitHub Wiki
Following are the steps involved in setting up CLIxDataRepository on local or server. Please refer this for more detailed instructions:
- Clone 'clix_datarepository_ckan'. We will be using the master branch as it was working fine for us.
- Move into 'clix_datarepository_ckan'. Navigate to docker folder with
cd contrib/docker
- Copy template environment variables file -
cp .env.template .env
. This file contains all the environment variables which go as input into docker-compose - Inside '.env' file, If the setup is on a server change CKAN_SITE_URL to '', otherwise we can leave it to default value
- Run
docker-compose up -d
from inside the docker folder. Now ckan site will be up - Follow these steps to create aliases to mounted docker volumes for our convenience:
- export VOL_CKAN_HOME=
docker volume inspect docker_ckan_home | jq -r -c '.[] | .Mountpoint'
- export VOL_CKAN_CONFIG=
docker volume inspect docker_ckan_config | jq -r -c '.[] | .Mountpoint'
- export VOL_CKAN_STORAGE=
docker volume inspect docker_ckan_storage | jq -r -c '.[] | .Mountpoint'
- export VOL_CKAN_HOME=
- To initialise datastore, run following commands :
docker exec -it db sh /docker-entrypoint-initdb.d/00_create_datastore.sh
docker exec ckan /usr/local/bin/ckan-paster --plugin=ckan datastore set-permissions -c /etc/ckan/production.ini | docker exec -i db psql -U ckan
- Now we will add datapusher and datastore plugins. Please refer this for DataPusher configs:
sudo vim $VOL_CKAN_CONFIG/production.ini
- Add datastore datapusher to ckan.plugins and enable the datapusher option ckan.datapusher.formats
- Add resource_proxy to ckan.plugins and also enable max_file_sizes and chunk size
- Increase max file size to 10MB for preview files:
- ckan.resource_proxy.max_file_size = 10485760
- ckan.resource_proxy.chunk_size = 4096
- set ckan.datapusher.url = http://127.0.0.1:8800/
- set ckan.datapusher.assume_task_stale_after = 3600
- set ckan.site_url to localhost or server-ip
- To reflect these changes, run
docker-compose restart ckan
- To check if these changes are reflected, run
CKAN_SITE_URL/api/3/action/datastore_search?resource_id=_table_metadata
- To have data sent to DataPusher, follow these steps :
docker exec -it datapusher /bin/bash
echo "SSL_VERIFY = 'False'" >> deployment/datapusher_settings.py
10.To get logo and images specific to clix: