Instructions on how to use the final product once deployed can be found in the docs folder, below is a table of contents with all the current documentation pages
cp .env.example .env
docker compose -f docker-compose.dev.yml up --build
cd frontend
cp .env.example .env
npm i && npm run dev
cd frontend
cypress.config.js
npm run test
or npm run open
When building your project specific CKAN images (the ones defined in the ckan/
folder), you can apply patches
to CKAN core or any of the built extensions. To do so create a folder inside ckan/patches
with the name of the
package to patch (ie ckan
or ckanext-??
). Inside you can place patch files that will be applied when building
the images. The patches will be applied in alphabetical order, so you can prefix them sequentially if necessary.
For instance, check the following example image folder:
ckan
├── patches
│ ├── ckan
│ │ ├── 01_datasets_per_page.patch
│ │ ├── 02_groups_per_page.patch
│ │ ├── 03_or_filters.patch
│ └── ckanext-harvest
│ └── 01_resubmit_objects.patch
├── setup
└── Dockerfile.dev
The ckanext-envvars extension is used in the CKAN Docker base repo to build the base images. This extension checks for environmental variables conforming to an expected format and updates the corresponding CKAN config settings with its value.
For the extension to correctly identify which env var keys map to the format used for the config object, env var keys should be formatted in the following way:
All uppercase
Replace periods ('.') with two underscores ('__')
Keys must begin with 'CKAN' or 'CKANEXT', if they do not you can prepend them with 'CKAN___
'
For example:
CKAN__PLUGINS="envvars image_view text_view recline_view datastore datapusher"
CKAN__DATAPUSHER__CALLBACK_URL_BASE=http://ckan:5000
CKAN___BEAKER__SESSION__SECRET=CHANGE_ME
These parameters can be added to the .env
file
For more information please see ckanext-envvars
Create a new user from the Docker host, for example to create a new user called 'admin'
docker exec -it <container-id> ckan -c ckan.ini user add admin email=admin@localhost
To delete the 'admin' user
docker exec -it <container-id> ckan -c ckan.ini user remove admin
Create a new user from within the ckan container. You will need to get a session on the running container
ckan -c ckan.ini user add admin email=admin@localhost
To delete the 'admin' user
ckan -c ckan.ini user remove admin