The whole CKAN deployment is using docker and docker-compose. The idea is to clone this repository, set server specifics via the .env file and then run the following steps.
These steps are only necessary when the corresponding code was changed. Build ckan_base
$ docker build ./ckan_base -t ckan_base
The other images get pulled from docker hub or the github registry or are build via docker-compose.
- BASE_DOMAIN needs to be set to the correct domain, which is used by ckan and a sparql.BASE_DOMAIN subdomain is then used for virtusoso
- VIRTUOSO_USER and VIRTUOSO_PASSWORD are for the virtusoso credentials
- GIT_REPO, GIT_EMAIL, GIT_NAME, CRON_JOB and GRAPH_URI are used in the import container, see virtuoso-import-docker folder
- SPARQL_ENDPOINT_DATA is for the maturitypipeline and should be the same as sparql.BASE_DOMAIN
The docker-compose file was created to be used with the JWilder nginx container and a lets encrypt companion. Thats why VIRTUAL_HOST, VIRTUAL_PORT and LETSENCRYPT_HOST are set. For more information please have a look on https://hub.docker.com/r/jwilder/nginx-proxy
CKAN is expecting to connect directly to the database. In the case of the preloaded image this is not possible since postgresql needs to execute *.sql scripts, so it is recommended to first run the database, and when the databases are ready, start ckan.
$ docker-compose up -d pusher redis solr postfix postgresql dataretrieval virtuoso maturitypipeline jekyllrdf taxonomygui sparnatural yasgui
$ docker-compose up ckan
For local execution use the docker-compose.local.yml file.
Execute the docker-compose file.
$ docker-compose up -d
Please note that this also starts the aggregation of metadata into virtuoso via the metadataimporter container and the import container.
db = ckan:postgres
You should create a new administrator account in the ckan container: https://docs.ckan.org/en/2.9/maintaining/getting-started.html#create-admin-user
User accounts and admin accounts can be created with paster command.
# Go inside the container
$ docker exec -ti ckan /bin/bash
https://docs.ckan.org/en/2.9/maintaining/getting-started.html#create-admin-user
Rebuild the index to make search engine match the current dataset.
$ ckan -c /etc/ckan/ckan.ini search-index rebuild