Flask Portal, Fast API backend, DB for Kraftjar App
- Run
poetry install-
Create '.env' file (simply copy file .env.sample):
-
Run
docker compose up d dbto create an docker container
-
Development and debugging
This project contains both Flask and FastAPI.
To run Flask app:
- go to "Run and Debug" tab in VSCode and select "Python:Flask" from dropdown menu
To run FastAPI app:
- go to "Run and Debug" tab in VSCode and select "API" from dropdown menu
After selection, press
"Run and Debug"button orF5key on keyboard -
Create db with command
flask db upgrade- In main folder need install node_modules to work with tailwind, run
yarnGo to ssh s2b and take the backup file from our server and put it in your environment:
cp /home/runner/kraftjar/backup/db_2024-10-29T10:35:27Z.tgz .mv db_2024-10-29T10:35:27Z.tgz dump.tgzIn our project, download dump.tgz:
scp s2b:dump.tgz .tar xvzf dump.tgzClear db and fill with data:
dcdn -v dbdcupd dbdce -T db psql < dump.sql