Closed shon closed 11 years ago
You have to run gnottify as a Django management command to pick up the Django integration, which adds message logging. From the README:
Running the Gnotty server when integrated with Django is simply a matter of running the gnottify Django management command:
$ python manage.py gnottify [options]
PS: All the options should be the same.
Yes I tried that. But that creates a redirection loop.
python manage.py gnottify -l DEBUG irc-host=irc.freenode.net \
--irc-channel=<channel> -n <nick> --bot-class=gnotty.bots.Voltron -p 8000
With as I open localhost:8000, browser detects redirection loop. Also in this case gnotty nick does not join the channel.
The -p option specifies the websocket port - you're not meant to access it directly. You described using 8080 above with Django's runserver command - you'd need to access localhost:8080 given everything you've described so far.
For sure it's my Django integration.
Django version is 1.4.3, if it matters.
Yes you need to run both.
Ok my confusion. Thanks for help and thanks for this really useful piece of software.
You're welcome!
How do you deploy this with apache, I have been able to run it locally with manage.py , now wondering how it can play with apache. Any help or pointers? Thanks for the awesome library
I've exposed the websocket server directly to the internet.
If you want to use Apache you'll need to work out how to get it to proxy websockets. Please report back your findings :-)
I will look into that, but my question is how do I start gnotty without using manage.py since in production I can't do that?
You're confusing the characteristics of the manage.py tool, and the runserver command.
Like I said I expose the websocket server directly to the internet using manage.py gnottify
, which has nothing to do with runserver
.
That's very true, I was wrong. This is my scenario, I have successfully setup the example project and the chat works fine, thanks for the hardwork :-). But now I have to start gnotty using manage.py gnottify in my terminal for the chat to work, now my confusion is, when I close the terminal the gnotty shuts down too, now I was wondering how this would play in production ie intergrate it with a site running django/apache/mod_wsgi? Thanks for your support, very much appreciated. :-)
We're well outside the scope of gnotty now, so forgive me if I don't reply again after this, but do a Google search for "process managers". I use one called supervisord.
Good luck.
Thankyou for your help. That is exactly what I needed. Thankyou again :-)
You're welcome!
I have setup gnotty+django pointing to our freenode irc channel. I was expecting all irc logs in archive. However there is none. Is there any config to enable logging?
I start gnotty like below
I have sqlite as my backend. May be I am missing something obvious.