diff --git a/README.md b/README.md index ae306600..7355d0af 100644 --- a/README.md +++ b/README.md @@ -472,6 +472,11 @@ invoke docker --build Run with `docker run` or `docker-compose` +#### Alternate Docker images + +If a full `gunicorn` deployment is unnecessary or [impractical on your hardware](https://fastapi.tiangolo.com/deployment/#raspberry-pi-and-other-architectures) consider using our single instance [`Uvicorn`](https://www.uvicorn.org/) based [Dockerfile](uvicorn.Dockerfile). + + ### Invoke Additional developer commands can be run by calling them with the [python `invoke` task runner](http://www.pyinvoke.org/). diff --git a/uvicorn.Dockerfile b/uvicorn.Dockerfile new file mode 100644 index 00000000..9ed45c16 --- /dev/null +++ b/uvicorn.Dockerfile @@ -0,0 +1,14 @@ +FROM python:3.7 + +# COPY DEPENDENCIES +COPY requirements.txt ./ + +# COPY PROJECT +COPY ./app /app + +EXPOSE 80 + +# INSTALL DEPENDENCIES +RUN pip install --no-cache-dir -r requirements.txt + +CMD ["uvicorn", "app.main:APP", "--host", "0.0.0.0", "--port", "80"]