@@ -38,7 +38,7 @@ install_nginx() {
38
38
}
39
39
40
40
create_user () {
41
- useradd -s /sbin/nologin $username
41
+ useradd $username
42
42
chmod go+x /home/$username
43
43
44
44
mkdir /home/$username /logs
@@ -129,17 +129,18 @@ install_python3() {
129
129
}
130
130
131
131
install_flask_gunicorn () {
132
- su $username << 'EOF '
132
+
133
+ su - $username << 'EOF '
133
134
cd public_html
134
135
python3 -m venv flask_demoenv
135
136
source flask_demoenv/bin/activate
136
- python3 -m pip install -r requirements.txt
137
- deactivate; logout
138
-
137
+ git init
138
+ git remote add origin https://github.com/rn4ir/flask-gunicorn-demo.git
139
+ git pull origin master
140
+ /usr/bin/yes | pip install -r requirements.txt
141
+ deactivate
142
+ logout
139
143
EOF
140
- # Download from VCS
141
- echo -e " PENDING: Download project from Git"
142
- exit
143
144
144
145
}
145
146
@@ -180,8 +181,6 @@ create_user
180
181
create_vhost
181
182
install_python3
182
183
183
- chsh -s /bin/bash $username
184
-
185
184
install_flask_gunicorn
186
185
configure_gunicorn
187
186
post_install
0 commit comments