I miss one variable in the configuration of the Emperor.
eg. %c - chdir in vassal config

What is my case:
$ uwsgi --emperor /path_a/conf

in /path_a/conf/*.ini files are linked to /path_b/project_name/config.ini

Each project has a several of configuration files, for example: dev.ini, 
production.ini etc.
Therefore, I can use in any way with %n

Directory containing configuration files is different than the target project 
directory.
Therefore, I can use in any way with %d


It was best to have something like this:
project dir: /path_b/proj1
project config files:
/path_b/proj1/prod.ini
/path_b/proj1/dev.ini

in /path_b/proj1/dev.ini:
[uwsgi]
socket = /tmp/uwsgi/proj1.sock
chdir = /path_b/proj1
spooler = data/spooler
daemonize = data/uwsgi.log
pidfile = data/uwsgi.pid

or

[uwsgi]
socket = /tmp/uwsgi/proj1.sock
chdir = /path_b/proj1
spooler = %c/data/spooler
daemonize = %c/data/uwsgi.log
pidfile = %c/data/uwsgi.pid

So that spooler pointed to /path_b/proj1/data/spooler

then:
$ ln -s /path_a/conf/proj1.conf /path_b/proj1/dev.ini

and run uWSGI in emperor mode:
$ uwsgi --emperor /path_a/conf


or:
$ uwsgi --emperor /path_a/conf --vassal-base-dir /path_b
vassal-base-dir > %v
and "id" for vassal id  > %i

[uwsgi]
id = proj1
socket = /tmp/uwsgi/%i.sock
chdir = %v/%i
spooler = %v/%i/data/spooler


--
Łukasz Wróblewski
http://www.nri.pl/ - Nowoczesne Rozwiązania Internetowe
http://www.hostowisko.pl/ - Profesjonalny i tani hosting
http://www.katalog-polskich-firm.pl/ - Najlepszy darmowy katalog firm
_______________________________________________
uWSGI mailing list
[email protected]
http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi

Reply via email to