Il giorno 07/mar/2011, alle ore 11.46, Łukasz Wróblewski ha scritto:

> 
> 
> ----- Oryginalna wiadomość -----
>> Od: "Roberto De Ioris" <[email protected]>
>> Do: "uWSGI developers and users list" <[email protected]>
>> Wysłane: poniedziałek, 7 marzec 2011 11:08:51
>> Temat: Re: [uWSGI] uWSGI 0.9.7-beta1 - emperor
>> 
>> Ok, now it is clear to me what you are trying to accomplish.
>> 
>> Pratically you need in vassals the directory from which they are
>> spawned (before every chdir())
> 
> I guess I explain it wrong :]
> 
> My configuration file looks like this:
> [uwsgi]
> socket = /tmp/uwsgi/p1.sock
> chdir = /home/a/p1
> spooler = /home/a/p1/data/spooler
> logto = /home/a/p1/data/uwsgi.log
> pidfile = /home/a/p1/data/uwsgi.pid
> 
> And I would like to write only onece path to the project (application / 
> vassal).
> Often, the paths are long.
> 
> One of the things that came to my mind, it is saved to the variable value 
> "chdir" from configuration file.
> Something like that:
> http://docs.python.org/library/configparser.html#examples
> """
> config.set('Section1', 'bar', 'Python')
> config.set('Section1', 'foo', '%(bar)s is %(baz)s!')
> """
> 
> I'd love to:
> 
> [uwsgi]
> socket = /tmp/uwsgi/p1.sock
> chdir = /home/a/p1
> 
> spooler = %(chdir)/data/spooler
> logto = %(chdir)/data/uwsgi.log
> pidfile = %(chdir)/data/uwsgi.pid
> 
> or



Ok, i have put some effort on a more advanced configuration system, adding 
references [via %(var)] and allowing users to define custom options
they can use in their apps.

I have added two configuration example here:

http://projects.unbit.it/uwsgi/browser/vassals

Note: the <app> tag in xml files cannot use references in its child.

--
Roberto De Ioris
http://unbit.it

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

Reply via email to