On 29.04.18 17:06, Valentin V. Bartenev wrote:

> You can set a path to Python virtual environment using the "home"
> parameter of application object.

Ah, that was the missing piece, thank you.

> Please also note that your application callable need to be named
> "application" (not "app").

Alright, I changed my wsgi.py to this:

  from mypackage import app as application
  if __name__ == "__main__":
      application.run()

My application can now be called via NGINX -> NGINX Unit -> App, which
is exactly what wanted. It also requires certain environment variables
to be set, and I am now wondering how to pass these on? I found the
enhancement request https://github.com/nginx/unit/issues/12 but since
this feature does not seem to be implemented yet, what is the
recommended method to pass env variables to Unit workers?

-Ralph
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx

Reply via email to