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.
- Host: GitHub
- URL: https://github.com/datarohit/learning-fastapi
- Owner: DataRohit
- Created: 2024-01-07T13:56:21.000Z (almost 2 years ago)
- Default Branch: master
- Last Pushed: 2024-01-08T16:04:58.000Z (almost 2 years ago)
- Last Synced: 2025-02-15T07:47:16.359Z (10 months ago)
- Topics: alembic, docker, docker-compose, fastapi, pgadmin, postgres, sqlalchemy, swagger-ui
- Language: Python
- Homepage:
- Size: 6.84 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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
```