Skip to content

Adding Removing Extensions

Steve Saylor edited this page Nov 21, 2023 · 2 revisions

There are two primary steps to adding an extension to our deployment.

  1. Installing the extension within the CKAN docker image.
  2. Adding the extension's plugins to the list of installed plugins in ckan.ini (key: ckan.plugins).
  3. (rarely) Install any extra requirements for the extension.

1. Installing the extension in the ckan docker image.

Add a RUN instruction to ckan/Dockerfile (ckan/Dockerfile.dev in development) that loads the extension code into the image and installs any python requirements for the extension.

e.g. with extra requirements and from GitHub - DCAT

RUN  pip3 install -e git+https://github.com/ckan/ckanext-dcat.git#egg=ckanext-dcat && \
     pip3 install -r ${APP_DIR}/src/ckanext-dcat/requirements.txt

e.g. without extra requirements and from PyPi - PDF View

RUN pip3 install ckanext-pdfview

2. Adding the extensions plugin(s) to plugin list in ckan.ini.

Edit the .env file for the deployment and add the plugin to CKAN__PLUGINS.
Plugins are loaded in reverse order from right to left. The plugin envvars must be loaded first (i.e. the last in the list).

3. Install any extra requirements for the extension.

This step will vary from extension to extension and most extensions won't require anything to be done in this step.

Based on the instructions in the extensions installation instructions you may need to do one or more of the following.