Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support gunicorn >=20.1.0 defaults (do not require APP_ environment variables) #599

Closed
kpfleming opened this issue Apr 19, 2023 · 1 comment

Comments

@kpfleming
Copy link

Container platform

Podman/Docker

Version

Latest code in repo, this is a feature request.

OS version of the container image

RHEL 7, RHEL 8, RHEL 9, CentOS 7, CentOS Stream 8, CentOS Stream 9, Fedora

Bugzilla, Jira

No response

Description

As of version 20.1.0, Gunicorn has a default for its config parameter, which is gunicorn.conf.py. In addition the wsgi_app parameter can be set there.

As a result, with a sufficiently new version of Gunicorn, there are no environment variables or command-line parameters required at all to properly start the application.

Given that, I think it would be useful for the owner of the application being packaged to be able to control the wsgi_app directly in their code repository, and not have to ensure that APP_MODULE or APP_CONFIG are set properly in their execution environment (or provide an .s2i/environment file which sets one of them). This keeps all of the knowledge of how to start the application in 'normal' Gunicorn locations, so that it can be started manually or in an s2i-created image in the same way.

Presumably the run script would need to verify that the Gunicorn version is high enough, and that gunicorn.conf.py exists and that wsgi_app is set in it, before deciding to start Gunicorn in this 'bare' fashion.

Reproducer

No response

@frenzymadness
Copy link
Member

I would appreciate a PR or any other help with this. I understand how useful it might be but because it doesn't really cause any problems it's not high in my ToDo.

hrnciar added a commit to hrnciar/s2i-python-container that referenced this issue Jun 3, 2024
hrnciar added a commit to hrnciar/s2i-python-container that referenced this issue Jun 3, 2024
hrnciar added a commit to hrnciar/s2i-python-container that referenced this issue Jun 4, 2024
hrnciar added a commit to hrnciar/s2i-python-container that referenced this issue Jun 4, 2024
hrnciar added a commit to hrnciar/s2i-python-container that referenced this issue Jun 11, 2024
hrnciar added a commit to hrnciar/s2i-python-container that referenced this issue Jun 12, 2024
hrnciar added a commit to hrnciar/s2i-python-container that referenced this issue Jun 21, 2024
hrnciar added a commit to hrnciar/s2i-python-container that referenced this issue Jun 26, 2024
hrnciar added a commit to hrnciar/s2i-python-container that referenced this issue Jun 27, 2024
hrnciar added a commit to hrnciar/s2i-python-container that referenced this issue Jun 27, 2024
hrnciar added a commit to hrnciar/s2i-python-container that referenced this issue Jun 28, 2024
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

No branches or pull requests

2 participants