[Update] 改为supervisor启动

This commit is contained in:
ibuler
2018-03-16 10:43:21 +08:00
parent f195b309d4
commit 2ab26e25cc
3 changed files with 148 additions and 5 deletions

View File

@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
# coding: utf-8
import os
@@ -38,13 +38,13 @@ except:
def make_migrations():
print("Check database change, make migrations")
os.chdir(os.path.join(BASE_DIR, 'apps'))
subprocess.call('python manage.py migrate', shell=True)
subprocess.call('python3 manage.py migrate', shell=True)
def collect_static():
print("Collect static files")
os.chdir(os.path.join(BASE_DIR, 'apps'))
subprocess.call('python manage.py collectstatic --no-input', shell=True)
subprocess.call('python3 manage.py collectstatic --no-input', shell=True)
def start_gunicorn():