Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/testdrivenio/fastapi-docker-traefik
FastAPI with Docker and Traefik
https://github.com/testdrivenio/fastapi-docker-traefik
fastapi fastapi-docker lets-encrypt traefik
Last synced: about 2 months ago
JSON representation
FastAPI with Docker and Traefik
- Host: GitHub
- URL: https://github.com/testdrivenio/fastapi-docker-traefik
- Owner: testdrivenio
- License: mit
- Created: 2021-05-04T00:07:48.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-02-02T15:01:07.000Z (almost 2 years ago)
- Last Synced: 2024-08-07T23:41:48.746Z (5 months ago)
- Topics: fastapi, fastapi-docker, lets-encrypt, traefik
- Language: Python
- Homepage:
- Size: 7.81 KB
- Stars: 102
- Watchers: 7
- Forks: 31
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Dockerizing FastAPI with Postgres, Uvicorn, and Traefik
## Want to learn how to build this?
Check out the [post](https://testdriven.io/blog/fastapi-docker-traefik/).
## Want to use this project?
### Development
Build the images and spin up the containers:
```sh
$ docker-compose up -d --build
```Test it out:
1. [http://fastapi.localhost:8008/](http://fastapi.localhost:8008/)
1. [http://fastapi.localhost:8081/](http://fastapi.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
```