- Create a
.envfile that contains a variable ofSQLALCHEMY_DATABASE_URI,GMAIL_ACCOUNT,GMAIL_PASSWORD,RECEIVER_EMAIL_LIST, andADMIN_EMAIL_LIST.
SQLALCHEMY_DATABASE_URI=mysql+pymysql://<username>:<password>@127.0.0.1:3306/superb
GMAIL_ACCOUNT=<sender_account>
GMAIL_PASSWORD=<sender_password>
RECEIVER_EMAIL_LIST=<receiver_1>,<receiver_2>,...
ADMIN_EMAIL_LIST=<admin_1>,<admin_2>,...
- Install requirements and unzip required files
./prepare.sh- In
backend/run
- For development
python3 app.py- For production (w/o independent environment)
uwsgi --ini app.ini- For production (w/ independent environment) [Recommended]
- Install
pipenv
pip3 install pipenv
pipenv --three
pipenv install- Get the path of virtual env directory
pipenv --venv- Append
app.iniwith the virtual env directory
virtualenv = <path to the virtual directory>- Start server with
<path to the virtual directory>/bin/uwsgi --ini app.ini