[ckan-dev] Changing Docker CKAN DB password

Matt Fullerton matt.fullerton at okfn.de
Mon Dec 29 11:21:31 UTC 2014


The CKAN instructions note that the docker image is not suitable for use in
production because the ckan role has the password 'ckan' in postgres. I am
using customconfig.ini to configure my CKAN (working, as I have to change
the IP address for the postgres container sqlalchemy config) by building my
own image. My strategy is to change the password there before building the
image. Then before I even attempt to run the final container I do this:

docker run -i -t --link db:db offenedaten_de bin/bash -c 'psql -U ckan -h
172.17.0.11 -d ckan -c \\password'

I am asked for the current password (ckan) and I enter a new one. But then
the main CKAN image doesn't work:

*** Running /etc/my_init.d/70_initdb...
Traceback (most recent call last):
  File "/usr/lib/ckan/default/bin/paster", line 9, in <module>
    load_entry_point('PasteScript==1.7.5', 'console_scripts', 'paster')()

<trimmed>

  File
"/usr/lib/ckan/default/local/lib/python2.7/site-packages/psycopg2/__init__.py",
line 179, in connect
    connection_factory=connection_factory, async=async)
sqlalchemy.exc.OperationalError: (OperationalError) FATAL:  password
authentication failed for user "ckan"
FATAL:  password authentication failed for user "ckan"
 None None
*** /etc/my_init.d/70_initdb failed with status 1

When I run the earlier command again and change the password back to
'ckan', it works.

Anyone have any idea what I'm doing wrong?

Best Regards,
Matt
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/ckan-dev/attachments/20141229/be269c3e/attachment-0002.html>


More information about the ckan-dev mailing list