Add .env in the root folder and add the following variables:
POSTGRES_USER='<YOUR_POSTGRES_USER>'
POSTGRES_PASSWORD='<YOUR_POSTGRES_PASSWORD>'
POSTGRES_DB='<YOUR_POSTGRES_DATABASE>'
SQLALCHEMY_DATABASE_URI='postgresql+psycopg2://<YOUR_POSTGRES_USER>:<YOUR_POSTGRES_PASSWORD>@<POSTGRES_HOST>:5432/<YOUR_POSTGRES_DATABASE>'
docker-compose up --build <service> -d
The \
In localhost, backend and postgres services will be started at 9010 and 5432 ports respectively
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
to create migrations folder:
flask db init
to create the tables in the database:
flask db migrate
flask db upgrade
to run the backend:
flask run