Develop an application using FastAPI and PostgreSQL, following the web article.
- Following
- Official
- Python 3.10
- FastAPI
- Web Framework
- Mako
- welcome to Mako!
- Template library
- Alembic
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
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