This project was created to comply with weddinginvitation frontend app
Tech stacks: Render container (previously Heroku container), Python FastAPI, Render PostgreSQL
uvicorn wedding_app.main:app --reload
If you are Docker euthanist, have Docker Desktop on your end:
docker-compose up --build
Runs the app in the development mode.
Open http://localhost:8000/docs to view it in the browser.
The page will reload if you make edits.
You will also see any lint errors in the console.
Make sure you have Python environment or Anaconda available
pip install -r requirements.txt
conda env create -f environment.yml
We should fix the formatting issues that might caused pipeline blocks
black .
OR
docker exec weddingbackend black .
This is to setup heroku container for staging uses
heroku login
heroku stack:set container -a weddingbackend
For staging environment like Heroku:
heroku config:set SQLALCHEMY_DATABASE_URL="postgresql://{user}:pw@{hostname}.{yourhostingwebsite}.com/wedding_db_lgif" -a weddingbackend
heroku config:set SECRETKEY=xxxx -a weddingbackend
Local:
SQLALCHEMY_DATABASE_URL=postgresql://
SECRETKEY=xxxx
USER=xx
PASSWORD=xxx
You can store the env variable somewhere using .env or setting this inside your heroku container so it don't get exposed.
For Render just find Environment Variable
in deploy section and key in manually.