Bind to the host to allow connections in FastAPI Docker example (#6753)

This wouldn't allow connections as written
This commit is contained in:
Zanie Blue 2024-08-28 10:33:54 -05:00 committed by GitHub
parent 37e29f1109
commit 451eef31a6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -138,7 +138,7 @@ WORKDIR /app
RUN uv sync --frozen --no-cache
# Run the application.
CMD ["/app/.venv/bin/fastapi", "run", "app/main.py", "--port", "80"]
CMD ["/app/.venv/bin/fastapi", "run", "app/main.py", "--port", "80", "--host", "0.0.0.0"]
```
For more on using uv with Docker, see the [Docker guide](./docker.md).