|  | @@ -81,21 +81,33 @@ create wsgidav configuration file for webdav:
 | 
	
		
			
			| 81 | 81 |  
 | 
	
		
			
			| 82 | 82 |      cp wsgidav.conf.sample wsgidav.conf
 | 
	
		
			
			| 83 | 83 |  
 | 
	
		
			
			| 84 |  | -## Run Tracim_backend ##
 | 
	
		
			
			|  | 84 | +## Run Tracim_backend With Uwsgi : great for production ##
 | 
	
		
			
			| 85 | 85 |  
 | 
	
		
			
			| 86 |  | -### With Uwsgi ###
 | 
	
		
			
			| 87 | 86 |  
 | 
	
		
			
			| 88 |  | -Run all services with uwsgi
 | 
	
		
			
			|  | 87 | +#### Install Uwsgi
 | 
	
		
			
			|  | 88 | +
 | 
	
		
			
			|  | 89 | +You can either install uwsgi with pip or with you distrib package manager:
 | 
	
		
			
			| 89 | 90 |  
 | 
	
		
			
			| 90 | 91 |      # install uwsgi with pip ( unneeded if you already have uwsgi with python3 plugin enabled)
 | 
	
		
			
			| 91 | 92 |      sudo pip3 install uwsgi
 | 
	
		
			
			|  | 93 | +
 | 
	
		
			
			|  | 94 | +or on debian 9 :
 | 
	
		
			
			|  | 95 | +
 | 
	
		
			
			|  | 96 | +    # install uwsgi on debian 9
 | 
	
		
			
			|  | 97 | +    sudo apt install uwsgi uwsgi-plugin-python3
 | 
	
		
			
			|  | 98 | +
 | 
	
		
			
			|  | 99 | +### All in terminal way ###
 | 
	
		
			
			|  | 100 | +
 | 
	
		
			
			|  | 101 | +
 | 
	
		
			
			|  | 102 | +Run all services with uwsgi
 | 
	
		
			
			|  | 103 | +
 | 
	
		
			
			| 92 | 104 |      # set tracim_conf_file path
 | 
	
		
			
			| 93 | 105 |      export TRACIM_CONF_PATH="$(pwd)/development.ini"
 | 
	
		
			
			| 94 | 106 |      export TRACIM_WEBDAV_CONF_PATH="$(pwd)/wsgidav.conf"
 | 
	
		
			
			| 95 | 107 |      # pyramid webserver
 | 
	
		
			
			| 96 |  | -    uwsgi -d /tmp/tracim_web.log --http-socket :6543 --wsgi-file wsgi/web.py -H env --pidfile /tmp/tracim_web.pid
 | 
	
		
			
			|  | 108 | +    uwsgi -d /tmp/tracim_web.log --http-socket :6543 --plugin python3 --wsgi-file wsgi/web.py -H env --pidfile /tmp/tracim_web.pid
 | 
	
		
			
			| 97 | 109 |      # webdav wsgidav server
 | 
	
		
			
			| 98 |  | -    uwsgi -d /tmp/tracim_webdav.log --http-socket :3030 --wsgi-file wsgi/webdav.py -H env --pidfile /tmp/tracim_webdav.pid
 | 
	
		
			
			|  | 110 | +    uwsgi -d /tmp/tracim_webdav.log --http-socket :3030 --plugin python3 --wsgi-file wsgi/webdav.py -H env --pidfile /tmp/tracim_webdav.pid
 | 
	
		
			
			| 99 | 111 |  
 | 
	
		
			
			| 100 | 112 |  to stop them:
 | 
	
		
			
			| 101 | 113 |  
 | 
	
	
		
			
			|  | @@ -104,7 +116,36 @@ to stop them:
 | 
	
		
			
			| 104 | 116 |      # webdav wsgidav server
 | 
	
		
			
			| 105 | 117 |      uwsgi --stop /tmp/tracim_webdav.pid
 | 
	
		
			
			| 106 | 118 |  
 | 
	
		
			
			| 107 |  | -### With Waitress (legacy way, usefull for debug) ###
 | 
	
		
			
			|  | 119 | +## With Uwsgi ini script file ##
 | 
	
		
			
			|  | 120 | +
 | 
	
		
			
			|  | 121 | +You can also preset uwsgi config for tracim, this way, creating this kind of .ini file:
 | 
	
		
			
			|  | 122 | +
 | 
	
		
			
			|  | 123 | +    # You need to replace <PATH> with correct absolute path
 | 
	
		
			
			|  | 124 | +    [uwsgi]
 | 
	
		
			
			|  | 125 | +    plugins = python3
 | 
	
		
			
			|  | 126 | +    chdir = <PATH>/tracim_v2/backend/
 | 
	
		
			
			|  | 127 | +    module = wsgi.web:application
 | 
	
		
			
			|  | 128 | +    home = <PATH>/tracim_v2/backend/env/
 | 
	
		
			
			|  | 129 | +    env = TRACIM_CONF_PATH=<PATH>/tracim_v2/backend/development.ini
 | 
	
		
			
			|  | 130 | +
 | 
	
		
			
			|  | 131 | +and :
 | 
	
		
			
			|  | 132 | +
 | 
	
		
			
			|  | 133 | +    # You need to replace <PATH> with correct absolute path
 | 
	
		
			
			|  | 134 | +    [uwsgi]
 | 
	
		
			
			|  | 135 | +    plugins = python3
 | 
	
		
			
			|  | 136 | +    chdir = <PATH>/tracim_v2/backend/
 | 
	
		
			
			|  | 137 | +    module = wsgi.webdav:application
 | 
	
		
			
			|  | 138 | +    home = <PATH>/tracim_v2/backend/env/
 | 
	
		
			
			|  | 139 | +    env = TRACIM_CONF_PATH=<PATH>/tracim_v2/backend/development.ini
 | 
	
		
			
			|  | 140 | +
 | 
	
		
			
			|  | 141 | +You can then run the process this way :
 | 
	
		
			
			|  | 142 | +
 | 
	
		
			
			|  | 143 | +    # You need to replace <WSGI_CONF_WEB> with correct path
 | 
	
		
			
			|  | 144 | +    uwsgi --ini <WSGI_CONF_WEB>.ini --http-socket :6543
 | 
	
		
			
			|  | 145 | +    # You need to replace <WSGI_CONF_WEBDAV> with correct path
 | 
	
		
			
			|  | 146 | +    uwsgi --ini <WSGI_CONF_WEBDAV>.ini --http-socket :3030
 | 
	
		
			
			|  | 147 | +
 | 
	
		
			
			|  | 148 | +### Run Tracim_Backend with Waitress : legacy way, usefull for debug and dev ###
 | 
	
		
			
			| 108 | 149 |  
 | 
	
		
			
			| 109 | 150 |  run tracim_backend web api:
 | 
	
		
			
			| 110 | 151 |  
 |