This repository contains a customized ckan setup originally developed by ismar for tools4msp catalogue here you can find the original repo
install Docker and docker compose
clone this repository into a local directory. To run this stack in localhost:
copy docker-compose_localhost
to docker-compose.yml
move into traefik directory
cd traefik
start traefik proxy
docker compose up -d
Type docker-compose
instead of docker compose
if you use the Python tool instead of the Docker plugin, when following this README file.
This will start a traefik instance that will route the http requests to docker containers according to docker compose configuration
Move back to starting directory
docker compose up --build --force-recreate -d
Ckan should be available on (http://localhost/ckan)
- Customize site settings
- Set
Homepage:
to the second or third choice (because of a CSS glitch)
- Set
- register a new user (e.g. ckan) and Login
- Set your user (
$USER
) as administratordocker compose exec ckan ckan -c /etc/ckan/production.ini sysadmin add $USER
This command will delete all the containers and all the volumes (-v
).
docker compose --profile prod down -v
For modifications to CSS with livereload
cd ckanext/ckanext-branding
npm install
npm run dev
The script generates a partial CKAN JSON schema from a data cluster spreadsheet, that can be merged into one an existing schema. It also produces a brief report in Markdown in the terminal (standard output).
- Be sure to have duckdb and jq installed
- Edit
spreadsheet_to_schema.sh
parametersSPREADSHEET
andWORKSHEET
to match your data cluster filename path and worksheet name - Run
spreadsheet_to_schema.sh
- Integrate the changes back into
ckanext/ckanext-schemas/ckanext/schemas/msp_data.json
meld is the suggested graphical tool to check the differences between the complete schema file and the partial one, generated from the data cluster file. It can be executed like this:
meld ckanext/ckanext-schemas/ckanext/schemas/itoos_data.json struttura.json
Problem: library initialization failed - unable to allocate file descriptor table - out of memory#
Solution: https://superuser.com/a/1413390
Example: URLError: <urlopen error [Errno 99] Cannot assign requested address>
Datapusher tries to access the URL of the resource, which is a public URL.
Make sure that the variable CKAN_SITE_URL
is set to the public domain and that is reacheable from the datapusher container.
http://ckan:5000
can be used when deploying locally, but make sure that /etc/hosts
contains ckan
as an alias for localhost
.
Solr indexes might need to be recreated:
ckan="$(docker container ls -qf name=catalogue-tools4msp-ckan)"
docker exec "$ckan" ckan search-index rebuild