Skip to content

Commit c99c596

Browse files
committed
Final tweaks
1 parent ec3efee commit c99c596

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

.diploi/helm/app.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,9 @@ spec:
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

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,17 +23,17 @@ Link to the full guide https://diploi.com/blog/hosting_fastapi_apps
2323
The 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

2929
This 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

3939
This can be changed with the `containerCommands.productionStart` field in `diploi.yaml`.

0 commit comments

Comments
 (0)