2. Setup
# TODO
cd backend
# create virtual environment
python -m venv ./venv
# activate venv
# LINUX:
source venv/bin/activate
# WINDOWS:
./venv/Scripts/activate
# if you encounter "running scripts is disabled on this system" use this command and then ./venv/...
Set-ExecutionPolicy -Scope "CurrentUser" -ExecutionPolicy "RemoteSigned"
# install all requirements
pip install -r requirements.txt- Run the Docker
- Start the container
# from backend directory
docker-compose -p kst-mysql-db -f docker-compose.yml up -dTo run the app you need to create kst_db database inside the MySQL container:
# open terminal inside the container
docker exec -it kst-mysql-db bash
# enter the MySQL console
mysql -u root -p
[ENTER PASSWORD](see `MySQL local db config` below)Now enter following SQL queries:
-- create database
CREATE
DATABASE kst_db;
-- Check if db created successfully
SHOW
DATABASES;Database is set up. You can run the app now
cd backend
python run.pydocker-compose -p kst-mysql-db -f docker-compose.yml stop
# WARNING! If you run `docker-compose ... down` it will remove all images, networks, volumes etc.
# For data persistence use `stop`.username: root
password: secret_password# UNIX:
sudo apt install nodejs
sudo apt install npm
# Windows:
# https://nodejs.org/en/download/npm install -g create-react-app
npm install
npm start