astral-sh / astral-sh/uv-fastapi-example

Advantage of using `/app/.venv/bin/fastapi` instead of `uv run fastapi` in `Dockerfile`?

Open
#1 2 comments 1 reaction 0 assignees View on GitHub
Dominant language
Python
Stars
174
Forks
37
PR merge metrics
No merged PRs in 30d

Description

Looking at https://github.com/astral-sh/uv-fastapi-example/blob/a488d3c248b14e26004c153fd149ab15e0eeb511/Dockerfile#L13-L14

Isn't it preferable to use `CMD ["uv", "run", "fastapi", "run", "app/main.py", "--port", "80"]` instead?

Contributor guide

No contributing guide indexed for this repository

Research direction

Read Dockerfile lines 13–14 at the referenced commit and compare the current executable invocation with the proposed `uv run fastapi` command. Check the example's container startup behavior and document which approach should be used, including the reason and any relevant validation command.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, fastapi, python
Domain
backend, devops
Issue type
Refactor
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.