You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I successfully setup a docker compose based dev environment. Now, I want to add some extensions to instance, but was not successfull, maybe I missed something.
I "git cloned" the extensions into the src folder (for example, the "scheming" extension). Then, I run bin/install_src and it ended up successfully:
Successfully built ckanext-scheming
Installing collected packages: ckanext-scheming
Successfully installed ckanext-scheming-3.1.0
Now, in the .env file, I changed/added (the file ckan_dataset.json lies beside the scheming extension):
After restarting the whole docker compose stack (or using the commands in bin), the scheming is not active. Taking a look at the logs of the Docker container, I can see that it seems to use /srv/app/ckan.ini (an empty default?) as config and not the stuff from the .env file:
[prerun] Setting the following plugins in /srv/app/ckan.ini:
image_view text_view datatables_view datastore datapusher envvars
I'm not sure if this is the problem, but inside the container, the script /srv/app/install_src.sh ends with the following lines, maybe pointing to the wrong file:
# Point `use` in test.ini to location of `test-core.ini`
if [ -f $i/test.ini ];
then
echo "Updating \`test.ini\` reference to \`test-core.ini\` for plugin $i"
ckan config-tool $i/test.ini "use = config:../../src/ckan/test-core.ini"
fi
I'm a step forward: it seems so that the docker containers have to be stopped before executing the install_src command. Now I have inside the container in /srv/app/ckan.ini the scheming extension enabled:
pointing to the metadata schema in "ckan_dataset.json" inside the scheming folder. But this variable is not given through to /srv/app/ckan.ini , so that the definition in ckan_dataset.json is not activated.
How can I pass this kind of parameter from .env to the cakn.ini file?
Since the CKAN container uses ckanext-envvars, you'll need to define .env with the format mentioned in the ckanext-envvars README: https://github.com/ckan/ckanext-envvars
However I still don't have the .env file values added to the ckan.ini file rather they exist in the container's environment variables (e.g. running the env command in the CKAN container). Perhaps that's expected behavior and CKAN should pick up the environment variables and override the values.
@rzmk thanks a lot, I was not aware of that syntax. And as I went through the docs, maybe this will help you (as it was also an issue for me):
To ensure all config settings are overridden by env var values, envvars must be the last plugin entry in the ckan.plugins list (see 'Installation' below).
Thanks I made that change, not sure if it was fixed before or after making the change but the environment variables are being used. Also if you're new to developing CKAN extensions there's this work-in-progress guide that @smotornyuk has been writing that has parts which have been useful to me: https://extension-modernization.readthedocs.io/en/latest/
@smotornyuk As an aside if ckan/ckan-docker is ideal for CKAN extension development then maybe in the modernization docs there could be a new tutorial or in the existing tutorial here there could be a follow-along tutorial on how to set up a development environment using ckan/ckan-docker and an example of how to develop a CKAN extension with this setup?
The guided tutorial could be very helpful for new CKAN extension developers with common flows (e.g. how to set up the dev environment, how to install an extension in your development environment, set up the .env file, etc.) and then point to the other pages in the docs which already exist for specific scenarios like adding tests and so on. Perhaps this could be added as an issue to the website's GitHub issues.
"Tutorials are lessons that take the reader by the hand through a series of steps to complete a project of some kind. They are what your project needs in order to show a beginner that they can achieve something with it."
Great idea. I'm aiming to merge the majority of pages from modernization docs into official CKAN documentation eventually. For now, it's more like a polygon for new idea verification and more frequently updated guidance - while CKAN docs are updated only with new patch releases, the modernization guide is not bound to the release cycle and can be updated as often as needed.
I'll try to work on docker-based lesson, but of course I'm not insisting on being dictator here and writing pages by myself - all PRs and ideas are welcome :) BTW, here's the repo
Probably it also worth introducing some kind of badge to mark new and recently modified pages, so that people who are already checking these docs are aware of updates.
Thanks, it would be great to have a complete documentation on development in a Docker based environment. I "inherited" some extensions we are using internally and tried to setup a Docker based dev platform. I had to google a lot and needed some help from here, but most stuff works now (still not 100% working, but I'm getting closer ;-) )
Activity
rzmk commentedon Aug 3, 2026
I'm also having similar issues such as the
/srv/app/ckan.inifile not being populated with the.envvalues.Tegomena commentedon Aug 4, 2026
I'm not sure if this is the problem, but inside the container, the script /srv/app/install_src.sh ends with the following lines, maybe pointing to the wrong file:
Tegomena commentedon Aug 4, 2026
I'm a step forward: it seems so that the docker containers have to be stopped before executing the install_src command. Now I have inside the container in /srv/app/ckan.ini the scheming extension enabled:
Next question comes up: to configure the scheming extension, I added to the .env file:
pointing to the metadata schema in "ckan_dataset.json" inside the scheming folder. But this variable is not given through to /srv/app/ckan.ini , so that the definition in ckan_dataset.json is not activated.
How can I pass this kind of parameter from .env to the cakn.ini file?
rzmk commentedon Aug 4, 2026
Since the CKAN container uses
ckanext-envvars, you'll need to define.envwith the format mentioned in the ckanext-envvars README: https://github.com/ckan/ckanext-envvarsHowever I still don't have the
.envfile values added to theckan.inifile rather they exist in the container's environment variables (e.g. running theenvcommand in the CKAN container). Perhaps that's expected behavior and CKAN should pick up the environment variables and override the values.Tegomena commentedon Aug 5, 2026
@rzmk thanks a lot, I was not aware of that syntax. And as I went through the docs, maybe this will help you (as it was also an issue for me):
To ensure all config settings are overridden by env var values, envvars must be the last plugin entry in the ckan.plugins list (see 'Installation' below).rzmk commentedon Aug 5, 2026
Thanks I made that change, not sure if it was fixed before or after making the change but the environment variables are being used. Also if you're new to developing CKAN extensions there's this work-in-progress guide that @smotornyuk has been writing that has parts which have been useful to me: https://extension-modernization.readthedocs.io/en/latest/
@smotornyuk As an aside if
ckan/ckan-dockeris ideal for CKAN extension development then maybe in the modernization docs there could be a new tutorial or in the existing tutorial here there could be a follow-along tutorial on how to set up a development environment usingckan/ckan-dockerand an example of how to develop a CKAN extension with this setup?The guided tutorial could be very helpful for new CKAN extension developers with common flows (e.g. how to set up the dev environment, how to install an extension in your development environment, set up the
.envfile, etc.) and then point to the other pages in the docs which already exist for specific scenarios like adding tests and so on. Perhaps this could be added as an issue to the website's GitHub issues.smotornyuk commentedon Aug 6, 2026
Great idea. I'm aiming to merge the majority of pages from modernization docs into official CKAN documentation eventually. For now, it's more like a polygon for new idea verification and more frequently updated guidance - while CKAN docs are updated only with new patch releases, the modernization guide is not bound to the release cycle and can be updated as often as needed.
I'll try to work on docker-based lesson, but of course I'm not insisting on being dictator here and writing pages by myself - all PRs and ideas are welcome :) BTW, here's the repo
Probably it also worth introducing some kind of badge to mark new and recently modified pages, so that people who are already checking these docs are aware of updates.
Tegomena commentedon Aug 6, 2026
Thanks, it would be great to have a complete documentation on development in a Docker based environment. I "inherited" some extensions we are using internally and tried to setup a Docker based dev platform. I had to google a lot and needed some help from here, but most stuff works now (still not 100% working, but I'm getting closer ;-) )