-
Notifications
You must be signed in to change notification settings - Fork 1
/
deploy.txt
64 lines (34 loc) · 1.29 KB
/
deploy.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
on beta
python3 exists
sudo apt-get install python3-venv
sudo apt-get install uwsgi-plugin-python3
cd /srv/PrefixCommons/PrefixPing
python3 -m venv prefixping
source source /srv/PrefixCommons/PrefixPing/prefixping/bin/activate
# to end 'deactivate'
# if needed
# pip3 install --upgrade pip
pip3 freeze prefixping.py > requirements.txt
pip3 install -r requirements.txt
#############################################
# http://flask.pocoo.org/docs/0.12/deploying/fastcgi/#configuring-nginx
create wsgi.py wrapper
and the prefixping.ini files
uwsgi --socket 0.0.0.0:5000 --protocol=http --plugin=python3 --virtualenv=/srv/PrefixCommons/PrefixPing/prefixping --manage-script-name --mount /=prefixping:app --ini prefixping.ini
###############################################
# FAIL set up wgsi service upstart FAIL
sudo cp prefixping.conf /etc/init/prefixping.conf
sudo start prefixping
FAIL systemd is the default now FAIL
################################################
set up wgsi service systemd
sudo cp prefixping.service /etc/systemd/system/prefixping.service
sudo systemctl start prefixping
sudo systemctl enable prefixping
################################################
edit nginx.conf
# test nginx.conf
sudo nginx -t
#
sudo service nginx restart
sudo systemctl restart nginx