Skip to content

Allow adapting UWSGI_OPTS from ENV for better Cloud support #114

@BWibo

Description

@BWibo

Hey CKAN folks,

I'm developing a Kubernetes Helm Chart for CKAN with a couple of extensions (available here).

It would be great to be able to set UWSGI_OPTS from ENV vars for several scenarios:

The ideal solution I see would look like this:

  1. UWSGI_OPTS is set to the defaults currently specified in ckan_start.sh:

    UWSGI_OPTS="--socket /tmp/uwsgi.sock \
    --wsgi-file /srv/app/wsgi.py \
    --module wsgi:application \
    --http [::]:5000 \
    --master --enable-threads \
    --lazy-apps \
    -p 2 -L -b 32768 --vacuum \
    --harakiri $UWSGI_HARAKIRI"

    • This would need to be change in a way, that the value can be overwritten using an ENV var. It is then in the resposibility of the user to provide suitable settings for CKAN.
  2. There should be another ENV var, that allows to extend the given defaults in UWSGI_OPTS, for instance EXTRA_UWSGI_OPTS.

This would allow to easily adapt the given defaults when its requried, or even overwirte the defaults options entirely, if this is necessary.

Are you generally open to a change like this? I could prepare a PR if yes.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions