[ckan-dev] Script configuring production.ini using paster config-tool

Gavin Cannizzaro gcannizzaro at mindgrub.com
Mon Oct 29 13:48:48 UTC 2018


If I'm understanding your question correctly, I'd be interested as well.

We ended up pre-processing the ini file using sed during the Docker
entrypoint.  I had no luck at all with the ckanext-envvars package, which
appears to be for a similar purpose (again, if I'm understanding correctly).

https://github.com/okfn/ckanext-envvars

I filed an issue about it but got no reply.

https://github.com/okfn/ckanext-envvars/issues/2


On Mon, Oct 29, 2018 at 9:37 AM, Terje Christensen <terje at businessmodel.io>
wrote:

> Hi
> I'm setting up a development version of ckan using docker. Adding the
> extra extensions I need in the Dockerfile.
>
> this works just fine. But I would also like to add the extensions that is
> installed to the config file (production.ini).
>
> I see that there is code that seems to do this. In ckan/lib/cli.py at line
> 2448 there are a class ConfigToolCommand.
> Examples:
>       paster config-tool default.ini sqlalchemy.url=123
> 'ckan.site_title=ABC'
>
> How can I use config-tool to set variables?
>
> I have tried
> 1) log into the docker instance running ckan
> docker exec -it ckan /bin/bash
>
> 2) run the paster command
> /usr/local/bin/ckan-paster config-tool /etc/ckan/production.ini
> 'ckan.site_title=ABC'
>
> 3) result is
> Command 'config-tool' not known (you may need to run setup.py egg_info)
> Known commands:
>   create       Create the file layout for a Python distribution
>   exe          Run #! executable files
>   help         Display help
>   make-config  Install a package and create a fresh config file/directory
>   points       Show information about entry points
>   post         Run a request for the described application
>   request      Run a request for the described application
>   serve        Serve the described application
>   setup-app    Setup an application, given a config file
>
> Terje
>
> _______________________________________________
> ckan-dev mailing list
> ckan-dev at lists.okfn.org
> https://lists.okfn.org/mailman/listinfo/ckan-dev
> Unsubscribe: https://lists.okfn.org/mailman/options/ckan-dev
>
>


-- 
------------------------------
[image: Mindgrub Technologies, LLC.] <http://www.mindgrub.com/> [image:
Inc. Best Workplaces Award]
<http://www.mindgrub.com/news/mindgrub-one-inc-magazine-s-best-places-work>
Gavin Cannizzaro
Lead Software Engineer
OFFICE 410.988.2444
DIRECT 410.988.2444
MOBILE 410.988.2444
www.mindgrub.com
This message (including any attachments) contains confidential information
intended for a specific individual and purpose, and is protected by law. If
you are not the intended recipient, you should delete this message and are
hereby notified that any disclosure, copying, or distribution of this
message, or the taking of any action based on it, is strictly prohibited.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/ckan-dev/attachments/20181029/688a7e62/attachment-0002.html>


More information about the ckan-dev mailing list