lookyloo/bin/start_website.py

15 lines
476 B
Python
Raw Normal View History

2019-01-23 15:13:29 +01:00
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
from subprocess import Popen
from lookyloo.helpers import get_homedir
if __name__ == '__main__':
2019-01-30 14:30:01 +01:00
website_dir = get_homedir() / 'website'
2019-01-23 15:13:29 +01:00
Popen([str(website_dir / '3rdparty.sh')], cwd=website_dir)
try:
2019-01-30 14:30:01 +01:00
Popen(['gunicorn', '--worker-class', 'eventlet', '-w', '10', '-b', '0.0.0.0:5100', 'web:app'],
2019-01-23 15:13:29 +01:00
cwd=website_dir).communicate()
except KeyboardInterrupt:
print('Stopping gunicorn.')