forked from douban/code
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathquick_start.sh
More file actions
executable file
·27 lines (23 loc) · 523 Bytes
/
quick_start.sh
File metadata and controls
executable file
·27 lines (23 loc) · 523 Bytes
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
#!/bin/bash
echo "Setup database..."
. ./setup_databases.sh
echo "Init virtualenv..."
which virtualenv > /dev/null 2>&1
if [ $? != 0 ];then
echo "Install virtualenv..."
pip install virtualenv
fi
virtualenv venv
. venv/bin/activate
pip install -U setuptools
pip install cython
which mysql_config > /dev/null 2>&1
if [ $? != 0 ];then
echo "mysql_config: command not found, must install it!"
exit 1
fi
pip install -r requirements.txt
echo "Start serving!!!"
echo
echo
gunicorn -w 2 -b 0.0.0.0:8000 app:app