Gunicorn: Specify APP_MODULE in config

Created on 1 Oct 2016  路  5Comments  路  Source: benoitc/gunicorn

Would be nice to be able to specify APP_MODULE in config instead of forcing the user to specify in the command line. Right now it's required, even though the argument is specified with brackets in the help section.

Improvement help wanted - Mailing List -

All 5 comments

Since gunicorn.conf.py is the default configuration file, if we could specify the app in the configuration file then it wouldn't be necessary to pass any command line arguments at all.

This requirement of not having it be available in config makes it impossible to make nice systemd unit files without needing to specify a new systemd file for every.single.site.

Good to see it's considered and not unwanted :)

I don't see the point. What is the different in "passing a config file" vs "passing a config file and a app module" in the systemd unit file?

Diff between:

exec = gunicorn

And

exec = gunicorn myapp.wsgi

The 'myapp.wsgi' is different between every app. I have Django sites and other Python sites, and even Django itself doesn't have a strict rule on where and what the wsgi app should be unless you read the settings and use that.

The config file can and will easily be the same for every deployed site since this belongs to the deployment, to the 'server' and admin you could say. While where the wsgi is often up to the app. Unless you also create your own wsgi wrapper for every single site. I guess that also could be done, but it seems a bit like make-work to me, when you could just specify it in the gunicorn config.

Closed by #1450.

Was this page helpful?
0 / 5 - 0 ratings