APIs for SafeAck Applications
-
Install and configure Docker 🐋
-
Install python 🐍
-
Clone repo
git clone https://github.com/SafeAck/backend.git
-
Usage SafeAck Deployment Manager script for managing deployment
python sdm.py -h
-
Deploy Backend
python sdm.py deploy
Note: use
python3
instead ofpython
-
Stop Backend
python sdm.py stop
-
Start Backend. Below command needs to be used once backend has been deployed and you need to start it again.
python sdm.py start
-
Upgrade Infra
python sdm.py upgrade
-
Migrate Manually
python sdm.py migrate
-
Get backend container shell access
python sdm.py shell
Hi 👋, If you'd like to contribute to SafeAck project then below sections are for you 😎
Update env and alembic.ini file when making changes to db
-
import newly generated model in
safeack-backend/models.py
-
create migrations
alembic revision --autogenerate -m "init"
-
apply migrations
alembic upgrade head
- Trigger shell
python -m safeack_backend.scripts.shell
- Enter python or db queries
from ..models import User
db.query(User).all()