Dnia piątek, 16 grudnia 2011 09:41:09 Roberto De Ioris pisze:
> > Dnia piątek, 16 grudnia 2011 08:57:02 Roberto De Ioris pisze:
> >> > This is rails 3.1.1.
> > 
> > Would it be possible for uWSGI to detect how to run rails (using --rack
> > or --
> > rails) and use this method?
> > Would it work if we had (for example) --smart-ruby option and if there
> > is
> > config.ru then uWSGI would run ruby app in the same way as it runs when
> > --rack
> > option is given, and if not then it would use --rails method?
> > Or maybe presence of config.ru itself doesn't mean that we should use
> > --rack?
> 
> That's the problem, this was my first idea, but then i found a user on one
> of my servers running a sinatra app into a rails one...so a config.ru in a
> rails app directory. This kind of conditional config is somewhat i would
> like to generalize for 1.1.
> 
> I have no clear syntax in my mind but i would like something
> 
> [uwsgi]
> if-file = config.ru!rack=config.ru!rails=appdir
> ; am i on heroku ?
> if-env = PORT!http-socket=$(PORT)!socket=:3031
> ; am i on unbit ? (no socket needed)
> if-env = UNBIT!!socket=:3031
> ; am i django ?
> if-file = settings.py!django=true
> if-opt = django!module=django.core.handlers.wsgi:WSGIHandler()
> if-opt = django!env=DJANGO_SETTINGS_MODULE=%d.settings

I like this approach, there is just few config templates for django/rails, so 
if it would be possible to setup them once, and have uWSGI logic decide which 
one to use is nice feature.

Łukasz Mierzwa
_______________________________________________
uWSGI mailing list
[email protected]
http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi

Reply via email to