Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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/).
Expand Down
14 changes: 14 additions & 0 deletions uvicorn.Dockerfile
Original file line number Diff line number Diff line change
@@ -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"]