- Python 3.9+
- Node.js 16+
- MySQL Server
- local container (lxc)
pip install -r requirements.txt
cd Front-End/
npm i
Create .env
file with the following variables:
SQLALCHEMY_DATABASE_URI="mysql+mysqlconnector://yourdbusername:yourdbpassword@localhost/yourdb"
JWT_SECRET_KEY="yoursecrect"
uvicorn app.main:app --reload --port 5000
pytest
pm2 delete all
pkill gunicorn
cd /var/www
git pull
cd Front-End/
npm i
npm run build
pm2 start npm --name "virtual-school" -- start
cd Back-End/
gunicorn --worker-class uvicorn.workers.UvicornWorker --daemon --bind 0.0.0.0:5000 app.main:app
alembic init alembic
alembic revision --autogenerate -m "init"
If you add a new db model you have to add new import in Back-End/alembic/env.py then you can run:
alembic revision --autogenerate -m "new changes"
alembic upgrade head