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

Please add nginx unit as "production" platform! #781

Open
jn0 opened this issue Nov 30, 2023 · 7 comments · May be fixed by #782
Open

Please add nginx unit as "production" platform! #781

jn0 opened this issue Nov 30, 2023 · 7 comments · May be fixed by #782

Comments

@jn0
Copy link

jn0 commented Nov 30, 2023

Please fix wsgi.py (around https://github.com/webpy/webpy/blob/master/web/wsgi.py#L75) to read as

    if (
        "SERVER_SOFTWARE" in os.environ
        or "PHP_FCGI_CHILDREN" in os.environ
        or "fcgi" in argv
        or "fastcgi" in argv
        or "mod_wsgi" in argv
        or "unit" in argv  # PLEASE ADD THIS FIX
    ):
        return False
@iredmail
Copy link
Contributor

iredmail commented Dec 4, 2023

Did you actually test webpy app with Nginx Unit?

@cclauss
Copy link
Contributor

cclauss commented Dec 6, 2023

Can we add those tests to our GitHub Actions?

@jn0
Copy link
Author

jn0 commented Dec 14, 2023

Did you actually test webpy app with Nginx Unit?

Yes, we run it in production.

@igorlidin
Copy link

Let me confirm the proposed enhancement, we also (successfully) use webpy with Nginx Unit.

@cclauss
Copy link
Contributor

cclauss commented Dec 15, 2023

Please add TESTS.

@jn0
Copy link
Author

jn0 commented Dec 18, 2023

Please add TESTS.

I cannot realize what is to be tested here?

If one would run the WSGI app in Nginx Unit, then he'll face the word "unit" passed in sys.argv (I've checked by logging argv).
So, the test is to run an application under Unit.

Do you need a sample app (it's a common web.py based WSGI) or what?

@iredmail
Copy link
Contributor

@cclauss i think we can simply add that line in webpy code.

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 a pull request may close this issue.

4 participants