An open API service indexing awesome lists of open source software.

https://github.com/datarohit/learning-fastapi

This repository contains the code for learning basics of FastAPI with Docker containers and images. The repository uses alembic and sqlalchemy to make migrations and migrate change to the database.
https://github.com/datarohit/learning-fastapi

alembic docker docker-compose fastapi pgadmin postgres sqlalchemy swagger-ui

Last synced: 9 months ago
JSON representation

This repository contains the code for learning basics of FastAPI with Docker containers and images. The repository uses alembic and sqlalchemy to make migrations and migrate change to the database.

Awesome Lists containing this project

README

          

# **Learning-FastAPI**

## **FastAPI Docker Setup Commands**

**1. Create a New Migration**
```bash
docker-compose run app alembic revision --autogenerate -m "New Migration"
```

**2. Migrate the Changes to Database**
```bash
docker-compose run app alembic upgrade head
```

**3. Build the App Container**
```bash
docker-compose build
```

**4. Start the Docker Container and Images**
```bash
docker-compose up
```