Monday, November 24, 2014

Re: How do I supply an appropriate application.wsgi to Gunicorn?

And with that, I'm off and running!

Thank you for your help.

On Mon, Nov 24, 2014 at 4:05 PM, Carl Meyer <carl@oddbird.net> wrote:
On 11/24/2014 03:00 PM, Carl Meyer wrote:
> On 11/24/2014 02:56 PM, Christos Jonathan Seth Hayward wrote:
>> Thanks so much!
>>
>> Could you confirm the invocation?
>>
>> cjsh@ps306627:~/cynthia$ gunicorn cynthia.wsgi 0.0.0.0:7777
>>
>> usage: gunicorn [OPTIONS] [APP_MODULE]
>>
>> gunicorn: error: No application module specified.
>
> That's the right invocation, but you need your python path set up to
> include the directory that has `manage.py` in it (when you actually run
> a `manage.py` command, this happens automatically, but not when you run
> gunicorn).
>
> There are a variety of ways that can be done, the simplest is to run
> your gunicorn command from the same directory that contains `manage.py`
> and set the PYTHONPATH env var:
>
>     PYTHONPATH=`pwd` gunicorn cynthia.wsgi 0.0.0.0:7777

Sorry, I was focused on the Python issues, didn't notice that you're
trying to pass a bind address without using the `-b` option. This is
what you want:

    PYTHONPATH=`pwd` gunicorn -b 0.0.0.0:7777 cynthia.wsgi

Carl

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/5473AB99.8040101%40oddbird.net.
For more options, visit https://groups.google.com/d/optout.



--
Christos Jonathan Seth Hayward
Christos Jonathan Seth Hayward, an Orthodox Christian author.

If you read just one of my books, you'll want The Best of Jonathan's Corner (Kindle).

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAE6_B5QMBGstoZJeVaEKN0ZuXevVS8t4Mdwk_1cbK%2B%2BTTr%2BvgA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment