2017-08-19 05:52:32 +02:00
|
|
|
from run import app, socketio, init_debug
|
2017-03-31 09:34:06 +02:00
|
|
|
import os
|
2017-09-11 00:37:31 +02:00
|
|
|
import subprocess
|
2017-03-31 09:34:06 +02:00
|
|
|
|
|
|
|
if __name__ == "__main__":
|
2017-09-11 00:37:31 +02:00
|
|
|
running = subprocess.check_output(['ps', '-A'])
|
|
|
|
if "postgres" not in str(running):
|
|
|
|
subprocess.call("sudo service postgresql start", shell=True)
|
|
|
|
subprocess.call("sudo service redis-server start", shell=True)
|
2017-03-31 09:34:06 +02:00
|
|
|
init_debug()
|
2017-08-19 05:52:32 +02:00
|
|
|
socketio.run(app, host=os.getenv('IP', '0.0.0.0'), port=int(os.getenv('PORT', 8080)), debug=True)
|