Skip to content

Latest commit

 

History

History
54 lines (39 loc) · 1.35 KB

README.md

File metadata and controls

54 lines (39 loc) · 1.35 KB

FastAPI with PostgreSQL Playground

Develop an application using FastAPI and PostgreSQL, following the web article.

Reference

Environment & Tool

Docker Build

pipenv lock -r > backend/requirements.txt

docker compose up -d --build

# attach server
docker compose exec server /bin/sh

# connect DB
docker compose exec db psql -h localhost -U postgres --dbname=postgres

Migration

ref. Welcome to Alembic’s documentation! — Alembic 1.7.6 documentation

docker compose exec server /bin/sh

### internal container
# create ddl script from template
alembic revision -m "create_first_tables"
# [!] executed as root

# upgrade
alembic upgrade head