-
Run app
- Build the app container:
docker build -t fastapi-app -f Dockerfile . - Run the app container:
docker run -p 8000:8000 fastapi-app
- Build the app container:
-
Run tests
- Build the test container:
docker build -t fastapi-test -f Dockerfile.test . - Run the test container:
docker run --rm fastapi-test
- Build the test container:
- Run app |
make run-app - Run tests |
make run-tests - Purge |
make purge - Available commands |
make help
Access postgreSQL: docker-compose exec postgres psql -U postgres -d postgres
Remove alembic version table DROP TABLE alembic_version;
check tables with
\dtand quit using\q
Create initial migration: docker-compose exec app alembic revision --autogenerate -m "initial migration"
Create Subsequent Migrations: docker-compose exec app alembic revision -m "description of migration"
Apply Subsequent Migrations: docker-compose exec app alembic upgrade head