File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 4343 - |
4444 set -e
4545 uv python install {{ ((.Values.envMap.PYTHON_VERSION).value | default "3.12") | quote }}
46- uv venv .venv
46+ uv venv .venv --clear
4747 if [ -f pyproject.toml ]; then
48- uv pip install -e .
48+ uv sync
4949 elif [ -f requirements.txt ]; then
5050 uv pip install -r requirements.txt
5151 fi
Original file line number Diff line number Diff line change @@ -23,17 +23,17 @@ Link to the full guide https://diploi.com/blog/hosting_fastapi_apps
2323The development server is started with:
2424
2525``` sh
26- uvicorn src.main:app --host 0.0.0.0 --port 8000 --reload --reload-dir src --reload-dir .venv/lib
26+ uv run --with uvicorn uvicorn src.main:app --host 0.0.0.0 --port 8000 --reload --reload-dir src --reload-dir .venv/lib
2727```
2828
2929This can be changed with the ` containerCommands.developmentStart ` field in ` diploi.yaml ` .
3030
3131### Production
3232
33- Builds a production-ready image. During the build, dependencies are installed with ` uv pip install ` . When the container starts, it runs:
33+ Builds a production-ready image. During the build, dependencies are installed with ` uv sync ` or ` uv pip install` . When the container starts, it runs:
3434
3535``` sh
36- uvicorn src.main:app --host 0.0.0.0 --port 8000 --proxy-headers
36+ uv run --with uvicorn uvicorn src.main:app --host 0.0.0.0 --port 8000 --proxy-headers
3737```
3838
3939This can be changed with the ` containerCommands.productionStart ` field in ` diploi.yaml ` .
You can’t perform that action at this time.
0 commit comments