ckanext-pages
ckanext-pages copied to clipboard
[Docker] `pages initdb` command defaults to `DEFAULT_SOLR_URL`
Running pages initdb
fails in our docker container as it attempts to connect to the DEFAULT_SOLR_URL
as defined in ckan/lib/search/common.py:29. Passing in our production.ini
does not appear to update the solr values.
Very naively I've tried these two initialisations and neither works:
RUN ckan -c ${APP_DIR}/production.ini pages initdb
# and then bluntly:
RUN CKAN_SOLR_URL=http://solr-headless:8983/solr ckan -c ${APP_DIR}/production.ini pages initdb
Is there something I'm missing, or is this the pages initdb
method failing to appropriately use the config?
Pages does not use solr at all and initdb just initializes postgresql databases. Most likely the build fails as the command requires functional ckan and it would fail with any command on any extension as the issue lies somewhere else than pages.
Thanks for replying!
I can confirm that just removing the initdb
command worked for us. I guess it just wasn't obvious to me that initdb
doesn't need to be run if you're working with a pre-initialised postgres.
I would put together a readme PR, but actually I'm not sure what the best guidance would be.