[ckan-dev] Running ckan on heroku
JD Bothma
jd at openup.org.za
Tue Dec 3 10:08:26 UTC 2019
Sorry it's been a month - I missed your reply.
For that we use ckanext-envvars to configure the variables ckan doesn't
accept environment variables for out of the box. We use the following
environment variables. It was a lot of trial and error to figure out the
right prefix for each variable name in ckanext-envvars but it helped a lot:
dokku config:set ckan
CKAN_SQLALCHEMY_URL=postgres://ckan_default:password@host/ckan_default \
CKAN_DATASTORE_READ_URL=postgres://datastore_default:...@...:5432/datastore_default
\
CKAN_DATASTORE_WRITE_URL=postgres://ckan_default:...@...:5432/datastore_default
\
CKAN_REDIS_URL=.../0 \
CKAN_INI=/ckan.ini \
CKAN_SOLR_URL=http://solr:8983/solr/ckan \
CKAN_SITE_URL=http://treasurydata.openup.org.za/ \
CKAN___BEAKER__SESSION__SECRET= \
CKAN_SMTP_SERVER= \
CKAN_SMTP_USER= \
CKAN_SMTP_PASSWORD= \
CKAN_SMTP_MAIL_FROM=
webapps+treasury-portal at openup.org.za \
CKAN___CKANEXT__S3FILESTORE__AWS_BUCKET_NAME=treasury-data-portal \
CKAN___CKANEXT__S3FILESTORE__AWS_ACCESS_KEY_ID= \
CKAN___CKANEXT__S3FILESTORE__AWS_SECRET_ACCESS_KEY= \
CKAN___CKANEXT__S3FILESTORE__HOST_NAME=
http://s3-eu-west-1.amazonaws.com/treasury-data-portal \
CKAN___CKANEXT__S3FILESTORE__REGION_NAME=eu-west-1 \
CKAN___CKANEXT__S3FILESTORE__SIGNATURE_VERSION=s3v4
Best
JD
On Thu, 7 Nov 2019 at 02:50, Reuben Cummings <reubano at gmail.com> wrote:
> Small world. Good to hear from you JD! We met a few years back at PyConZA.
> Thanks for the link, that will definitely help us moving forward. The main
> issue is that Heroku, unlike most other platforms, dynamically sets its own
> environment variables for connecting to the various databases. This means
> we need to tell ckan specifically where to look.
>
> Best
>
> Reuben
>
> On Tue, Nov 5, 2019 at 11:39 PM JD Bothma <jd at openup.org.za> wrote:
>
>> Hi Reuben
>>
>> This is how we set up ckan and datapusher in dokku, which is a
>> heroku-like interface to docker on one's own hardware:
>>
>> https://github.com/vulekamali/treasury-ckan
>>
>> We've been running this pretty happily for a couple of years now.
>> Figuring it all out initially was a lot of thinking and trying so well done!
>>
>> Obviously there are differences from heroku. A key thing Iwant to explore
>> is solr on a different host using basic authentication. That'll bring it
>> closer.
>>
>> Hope this helps!
>>
>> JD
>>
>> On Wed, 06 Nov 2019, 05:54 Reuben Cummings, <reubano at gmail.com> wrote:
>>
>>> Hi everyone. I haven't seen very much documentation on this topic so
>>> thought I would contribute our efforts thus far. As of now, we've been able
>>> to get ckan running (the site is broken atm, otherwise I'd provide a link
>>> to the live version) and have published a github repo with the working
>>> code <https://github.com/openpeoria/data-portal> [1]. However, we
>>> haven't yet gotten the datastore extension working or been able to create
>>> new users. Once we've resolved those and other issues, we will update our
>>> wiki <https://github.com/openpeoria/data-portal/wiki> [2] accordingly.
>>>
>>> Today, I was finally able to figure out the cause of the issue
>>> <https://github.com/ckan/ckan/issues/5055> [3] that was preventing us
>>> from enabling the datastore plugin, but it will require modifications
>>> to the ckan code <https://github.com/ckan/ckan/pull/5056> [4].
>>>
>>> Any ideas or suggestions are also most welcome!
>>>
>>> Best
>>>
>>> Reuben
>>>
>>> 1. https://github.com/openpeoria/data-portal
>>> 2. https://github.com/openpeoria/data-portal/wiki
>>> 3. https://github.com/ckan/ckan/issues/5055
>>> 4. https://github.com/ckan/ckan/pull/5056
>>>
>>> --
>>> Reuben Cummings
>>> Founder & President—Nerevu Group, LLC
>>> https://www.reubano.xyz <https://reubano.xyz>
>>>
>>> +1 (309) 361-7702
>>>
>>> skype:reubano
>>> reubano at gmail.com
>>>
>>> _______________________________________________
>>> 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
>>>
>> _______________________________________________
>> 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
>>
>
>
> --
> Reuben Cummings
> Founder & President—Nerevu Group, LLC
> https://www.reubano.xyz <https://reubano.xyz>
>
> +1 (309) 361-7702
>
> skype:reubano
> reubano at gmail.com
>
> _______________________________________________
> 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
>
--
JD Bothma
Software Developer
OpenUp
+27 (0)79 281 6737
+27 (0)21 671 6306
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/ckan-dev/attachments/20191203/bc7cb339/attachment.html>
More information about the ckan-dev
mailing list