Skip to content

Overwrite UWSGI_OPTS from ENV or adapt with EXTRA_UWSGI_OPTS#115

Merged
amercader merged 2 commits intockan:mainfrom
BWibo:feature/adapt-uwsgi-opts-from-env
May 7, 2025
Merged

Overwrite UWSGI_OPTS from ENV or adapt with EXTRA_UWSGI_OPTS#115
amercader merged 2 commits intockan:mainfrom
BWibo:feature/adapt-uwsgi-opts-from-env

Conversation

@BWibo
Copy link
Copy Markdown
Contributor

@BWibo BWibo commented Apr 9, 2025

This PR resolves #114. It extends the bahavior of start_ckan.sh to allow both overwriting and extending the uwsgi command line args. The current behavior of UWSGI_OPTS env var remains untouched, so this won't affect users that already overwirte UWSGI_OPTS, or don't.

  • In start_ckan.sh there is a new env var DEFAULT_UWSGI_OPTS that defines default options for uwsgi. This contains what was previously stored in UWSGI_OPTS in start_ckan.sh.
  • If UWSGI_OPTS is set at runtime, DEFAULT_UWSGI_OPTS is overwritten with the content of UWSGI_OPTS.
  • If the new env var EXTRA_UWSGI_OPTS is set at runtime, its content is appended to UWSG_OPTS.
  • For UWSGI_HARAKIRI a default values of 60 is introduced.

If there is any place to document this, let me know, I can add documentation.
Happily awaiting your review. :-)

@BWibo BWibo force-pushed the feature/adapt-uwsgi-opts-from-env branch from aafbe52 to 6d47fd7 Compare April 21, 2025 17:34
@BWibo BWibo marked this pull request as ready for review April 21, 2025 17:49
@amercader
Copy link
Copy Markdown
Member

This looks great, thanks @BWibo
To document this, it would be great if you could add two mentions of the env vars behaviour:

  • In this repo, before the Releases section
  • In the ckan-docker repo, which is the one most users will interact with, in a new sub-section in the CKAN Images section

Many thanks

@BWibo
Copy link
Copy Markdown
Contributor Author

BWibo commented Apr 24, 2025

The new docs are here: ckan/ckan-docker#215
They are mentioned before the release section of this repo.

@amercader amercader merged commit 24faf61 into ckan:main May 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow adapting UWSGI_OPTS from ENV for better Cloud support

2 participants