Build ckan_base ckan_base
$ docker build ./ckan_base -t ckan
Build ckan with plugins
$ docker build ../. -t ckan
Build postgresql or postgresql:loaded
$ docker build ./postgresql/ -t postgresql
$ docker build ./postgresql-loaded/ -t postgresql-loaded
- docker-compose is configured by default to work with postgresql:loaded docker-compose.yml,postgresql:loaded image postgresql,
- CKAN_SITE_URL needs to be set to the correct ip/domain docker-compose.yml,“ CKAN_SITE_URL” ip
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 db
$ docker-compose up ckan
Execute the docker-compose file.
$ docker-compose up
ckan = admin:admin
db = ckan:ckan
User accounts and admin accounts can be created with paster command.
# Go inside the container
$ docker exec -ti ckan bash
# Create new user
$ ckan-paster --plugin=ckan user -c $CKAN_CONFIG/ckan.ini add username [ email=[email protected] password=password ]
# Create new admin
$ ckan-paster --plugin=ckan sysadmin -c $CKAN_CONFIG/ckan.ini add username [ email=[email protected] password=password ]
Either by going inside the cointainer ckan, or running it with a modified entrypoint.
Rebuild the index to make search engine match the current dataset.
$ ckan-paster --plugin=ckan search-index rebuild -c $CKAN_CONFIG/ckan.ini