|
@@ -137,12 +137,31 @@ Mass deployments tricks & tips:
|
137
|
137
|
NINSTANCE=50
|
138
|
138
|
#Running mass_deploy
|
139
|
139
|
/usr/share/lodel2/scripts/mass_deploy $NINSTANCE
|
|
140
|
+
|
|
141
|
+ #FOLLOWING INSTRUCTIONS ARE FOR STARTING APPS WITH UWSGI
|
|
142
|
+ # for standalone instructions see bellow
|
|
143
|
+
|
140
|
144
|
#Updating nginx conf (delete /etc/nginx/sites-enabled/default if exists)
|
141
|
145
|
slim --nginx-conf -a > /etc/nginx/sites-enabled/lodel2
|
142
|
146
|
/etc/init.d/nginx reload
|
143
|
147
|
#Start all instances and check if they managed to start
|
144
|
148
|
slim --start -a && sleep 2 && slim -l
|
145
|
149
|
|
|
150
|
+ # FOLLOWING INSTRUCTIONS ARE FOR STANDALONE LODEL2 WEBSERVER
|
|
151
|
+
|
|
152
|
+ #Configure nginx & restart it
|
|
153
|
+ echo -e "server {\n\tlisten 80 default_server;\n\tlisten [::]:80 default_server;\n\tlocation / {\n\t\tproxy_pass http://127.0.0.1:1337/;\n\t}\n}\n" > /etc/nginx/sites-enabled/default
|
|
154
|
+ /etc/init.d/nginx restart
|
|
155
|
+ #Build dyncode for instances
|
|
156
|
+ slim -a -m
|
|
157
|
+ #Copy the multisite loader in lodel instances root folder
|
|
158
|
+ cp /usr/lib/python3/dist-packages/lodel/plugins/multisite/loader.py /tmp/lodel2_instances/
|
|
159
|
+ cd /tmp/lodel2_instances/
|
|
160
|
+ #Start the server
|
|
161
|
+ python3 loader.py
|
|
162
|
+ #Now you can access to the app in HTTP via nginx throught port 80
|
|
163
|
+ #or directly via the python server throught the port 1337
|
|
164
|
+
|
146
|
165
|
|
147
|
166
|
Cleaning mongodb + instances :
|
148
|
167
|
------------------------------
|