Changeset - 6a5fb5070765
[Not reviewed]
default
0 1 0
domruf - 8 years ago 2017-09-19 22:50:12
dominikruf@gmail.com
config: make the UWSGI host/port configurable with make-config parameters

UWSGI doesn't use the same host/port settings as other servers do.
1 file changed with 4 insertions and 3 deletions:
0 comments (0 inline, 0 general)
kallithea/lib/paster_commands/template.ini.mako
Show inline comments
 
@@ -100,27 +100,27 @@ proc_name = kallithea
 
worker_class = sync
 
max_requests = 1000
 
<%text>## amount of time a worker can handle request before it gets killed and</%text>
 
<%text>## restarted</%text>
 
timeout = 3600
 

	
 
%elif http_server == 'uwsgi':
 
<%text>## UWSGI ##</%text>
 
<%text>## run with uwsgi --ini-paste-logged <inifile.ini></%text>
 
[uwsgi]
 
socket = /tmp/uwsgi.sock
 
master = true
 
http = 127.0.0.1:5000
 
http = ${host}:${port}
 

	
 
<%text>## set as deamon and redirect all output to file</%text>
 
<%text>## set as daemon and redirect all output to file</%text>
 
#daemonize = ./uwsgi_kallithea.log
 

	
 
<%text>## master process PID</%text>
 
pidfile = ./uwsgi_kallithea.pid
 

	
 
<%text>## stats server with workers statistics, use uwsgitop</%text>
 
<%text>## for monitoring, `uwsgitop 127.0.0.1:1717`</%text>
 
stats = 127.0.0.1:1717
 
memory-report = true
 

	
 
<%text>## log 5XX errors</%text>
 
log-5xx = true
 
@@ -156,28 +156,29 @@ cheaper-algo = spare
 
cheaper = 1
 

	
 
<%text>## number of workers to spawn at startup</%text>
 
cheaper-initial = 1
 

	
 
<%text>## maximum number of workers that can be spawned</%text>
 
workers = 4
 

	
 
<%text>## how many workers should be spawned at a time</%text>
 
cheaper-step = 1
 

	
 
%endif
 
<%text>## COMMON ##</%text>
 
%if http_server != 'uwsgi':
 
host = ${host}
 
port = ${port}
 

	
 
%endif
 
<%text>## middleware for hosting the WSGI application under a URL prefix</%text>
 
#[filter:proxy-prefix]
 
#use = egg:PasteDeploy#prefix
 
#prefix = /<your-prefix>
 

	
 
[app:main]
 
use = egg:kallithea
 
<%text>## enable proxy prefix middleware</%text>
 
#filter-with = proxy-prefix
 

	
 
full_stack = true
 
static_files = true
0 comments (0 inline, 0 general)