-
Get the code from Github clone.
$ git clone https://github.com/zolars/SmartEdu.git
-
You need to install Miniconda and MySQL on your computer.
$ conda -V conda 4.8.1
You need to set "root" as the MySQL password. Or change the password in
config.py
.$ mysql -u root -p Enter password:root Welcome to the MySQL monitor. Commands end with ; or \g.
-
Create the environment.
$ cd SmartEdu $ conda env create -f environment.yml $ conda activate smartedu $ python -V Python 3.6.8 :: Anaconda, Inc.
If you want to update your environment, use:
$ conda env update -f environment.yml
-
Test running flask application.
$ conda activate smartedu $ export FLASK_APP=app $ flask run $ flask recreate-db
-
Deploy the nginx.
$ cp ./config/smartedu.conf /etc/nginx/conf.d/ $ sudo service nginx restart
-
Run the app with gunicorn.
$ conda activate smartedu $ gunicorn -c ./config/gunicorn.conf.py wsgi:app
-
Server Restart.
$ kill -9 <pid> $ conda activate smartedu $ sh deploy.sh
antaresfeng / smartedu Goto Github PK
View Code? Open in Web Editor NEWThis project forked from zolars/smartedu