okfn / docker-ckan

Docker images and Docker Compose setup for CKAN [Not Maintained]
GNU Affero General Public License v3.0
83 stars 91 forks source link

How to supply private license.json file? #120

Open ondics opened 1 year ago

ondics commented 1 year ago

The CKAN docs show how tio intergrate non standard licenses:

licenses_group_url = file:///path/to/my/local/json-list-of-licenses.json

In my Dockerfile I copied the license.json:

# use non standard license definition
COPY licenses.json /srv/app/licenses.json

How to define this config option in .env?

I tried multiple versions but none of them worked:

CKAN_LICENSES_GROUP_URL=file:///srv/app/licenses.json
CKAN__LICENSES_GROUP_URL=file:///srv/app/licenses.json
CKAN_licenses_group_url=file:///srv/app/licenses.json
CKAN__licenses_group_url=file:///srv/app/licenses.json
licenses_group_url=file:///srv/app/licenses.json
LICENSES_GROUP_URL=file:///srv/app/licenses.json

I ended up hacking the ckan.ini in the Dockerfile;

RUN sed -i 's,#licenses_group_url.*,licenses_group_url = file:///srv/app/licenses.json,g' /srv/app/ckan.ini

But that cannot be the clean solution. How to use .env for the license file?