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

https://github.com/null-none/docker-fastapi-traefik

Dockerizing FastAPI with Postgres, Uvicorn, and Traefik
https://github.com/null-none/docker-fastapi-traefik

docker fastapi python traefik

Last synced: 3 months ago
JSON representation

Dockerizing FastAPI with Postgres, Uvicorn, and Traefik

Awesome Lists containing this project

README

          

# Dockerizing FastAPI with Postgres, Uvicorn, and Traefik

### Development

Build the images and spin up the containers:

```sh
$ docker-compose up -d --build
```

Test it out:

1. [http://localhost:8008/](http://localhost:8008/)
1. [http://localhost:8081/](http://localhost:8081/)

### Production

Update the domain in *docker-compose.prod.yml*, and add your email to *traefik.prod.toml*.

Build the images and run the containers:

```sh
$ docker-compose -f docker-compose.prod.yml up -d --build
```