2020-05-10 20:31:42 +02:00
|
|
|
#!/bin/sh
|
|
|
|
cd /home/calendarwatch
|
2020-08-17 13:21:33 +02:00
|
|
|
|
|
|
|
# use flasks own uwsgi server for debugging:
|
|
|
|
# export FLASK_APP=/home/calendarwatch/server.py
|
|
|
|
# python3 server.py
|
|
|
|
|
|
|
|
|
|
|
|
# the --lazy flag forks() a new instance of the server
|
|
|
|
# instead of forking from the parent and copying the same mysql
|
|
|
|
# connection. If you don't do that, then multiple forks will use
|
|
|
|
# the same connection at the same time, causing the server to throw
|
|
|
|
# a 'connection has gone away' error.
|
|
|
|
# more here: https://serverfault.com/questions/407612/error-2006-mysql-server-has-gone-away
|
|
|
|
uwsgi --ini wsgi.ini --lazy
|
2020-05-17 22:59:12 +02:00
|
|
|
echo "server has been started"
|
|
|
|
|