mirror of
https://github.com/TitanEmbeds/Titan.git
synced 2024-12-25 06:27:03 +01:00
Cloud9 automatically start postgres and redis
This commit is contained in:
parent
25cd964403
commit
888ec81cc2
@ -1,6 +1,11 @@
|
||||
from run import app, socketio, init_debug
|
||||
import os
|
||||
import subprocess
|
||||
|
||||
if __name__ == "__main__":
|
||||
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)
|
||||
init_debug()
|
||||
socketio.run(app, host=os.getenv('IP', '0.0.0.0'), port=int(os.getenv('PORT', 8080)), debug=True)
|
Loading…
Reference in New Issue
Block a user