version: '3.8'
services:
fastapi_api:
build:
context: ./<path to Dockerfile>
# the 'app.main' part of the next line assumes your main.py file is in a folder named 'app'
command: gunicorn app.main:app --bind 0.0.0.0:5000 -w 2 -k uvicorn.workers.UvicornWorker
ports:
# host:container
- "8000:5000"