forked from bukun/GISLite
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdeploy.py
More file actions
17 lines (13 loc) · 696 Bytes
/
deploy.py
File metadata and controls
17 lines (13 loc) · 696 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
'''
Running locally. For Development.
'''
import subprocess
from cfg import SITE_WS, GIS_BASE, USER, DAMONS
subprocess.run('sudo chown -R {} {}/dist_site/*'.format(USER, SITE_WS), shell=True)
subprocess.run('sudo chown -R {} {}/dist_site'.format(USER, SITE_WS), shell=True)
subprocess.run('sudo chown -R {} {}/*'.format(USER, GIS_BASE), shell=True)
subprocess.run('cd {} && python3 gisliter.py'.format(SITE_WS), shell=True)
subprocess.run('sudo chown -R www-data.www-data {}/dist_site'.format(SITE_WS), shell=True)
subprocess.run('sudo chown -R www-data.www-data {}'.format(GIS_BASE), shell=True)
for dam in DAMONS:
subprocess.run('sudo supervisorctl restart {}'.format(dam), shell=True)