GitXplorerGitXplorer
e

fastapi-docker-basic

public
1 stars
4 forks
0 issues

Commits

List of commits on branch main.
Verified
f7efbd4f6b41182fc95336770b60e3cc83a07835

Add README early pass

eelena committed 3 years ago
Unverified
e4489ca01fcd33cce07bf0fd91603da8cf656599

Add Dockerfile and docker-compose

eelena committed 3 years ago
Unverified
e81b8a6afc8f548d5898d034ac372cfe908a6d81

Init requirements and main.py

eelena committed 3 years ago
Verified
1cacd30ee6c11ff06a9a3858bed43b1b926d8848

Initial commit

eelena committed 3 years ago

README

The README file for this repository.

Basic FastAPI Docker Setup

Intended to be related to the following fully baked cookiecutter projects:

These stacks are awesome and huge! Thanks @tiangolo for the great work! :sparkleheart:

Sometimes you just need a quick setup. This is intended to provide that setup.

Issues and PRs welcome.

Defaults (details in Configuration below, please feel free to change these, this is just some values to get going)

Quickstart

Install docker and have the daemon running: https://docs.docker.com/get-docker/

$ docker build -t my-fastapi-image .

Don't forget the .

$ docker compose up -d

See your FastAPI app running at http://localhost:8081 🎉

Configuration

Defaults in this repo. Please change them to suit your needs:

Python version:

Dockerfile#1: FROM python:3.8

localhost:PORT -- set to 8081

Don't need to change the 80, that's set in the Dockerfile and is only used "internally" by that image.

docker-compose.yaml#6: "8081:80"

image name my-fastapi-image

$ docker build -t my-fastapi-image .

docker-compose.yaml#4    image: my-fastapi-image