Skip to content

Inżynierski projekt zespołowy - Zachodniopomorski Uniwersytet Technologiczny w Szczecinie. Strona E-Learningowa do nauki języka programowania komputerów Python

Notifications You must be signed in to change notification settings

Luberski/Virtual_Python_School

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Virtual Python School

Requirements

  • Python 3.9+
  • Node.js 16+
  • MySQL Server
  • local container (lxc)

Installation

pip install -r requirements.txt
cd Front-End/
npm i

Pre-requisites

Create .env file with the following variables:

SQLALCHEMY_DATABASE_URI="mysql+mysqlconnector://yourdbusername:yourdbpassword@localhost/yourdb"
JWT_SECRET_KEY="yoursecrect"

Run back-end

uvicorn app.main:app --reload --port 5000

Testing

pytest

Production deployment

Killing

pm2 delete all
pkill gunicorn

Pulling

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

Updating the database

Back-End

Creating migration first time

alembic init alembic
alembic revision --autogenerate -m "init"

Updating

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

About

Inżynierski projekt zespołowy - Zachodniopomorski Uniwersytet Technologiczny w Szczecinie. Strona E-Learningowa do nauki języka programowania komputerów Python

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •