You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+6-11Lines changed: 6 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,32 +20,27 @@ Link to the full guide https://diploi.com/blog/hosting_fastapi_apps
20
20
21
21
### Development
22
22
23
-
During development, the container installs Node.js and `nodemon` to enable automatic reloads when files change. The development server is started with:
- Use nodemon to watch for changes to `pyproject.toml`, `requirements.txt`, and the virtual environment, restarting the server when changes are detected.
31
-
- Detect the dependency style and run in an isolated Python environment: with `pyproject.toml` using `uv run --with .`, with `requirements.txt` using `uv run --with-requirements`, or with no config file using uvicorn only.
32
-
- Start the FastAPI app using uvicorn on all network interfaces at port 8000.
33
-
- Enable hot-reload via uvicorn `--reload`, so the server automatically restarts when Python source files change.
29
+
This can be changed with the `containerCommands.developmentStart` field in `diploi.yaml`.
34
30
35
31
### Production
36
32
37
-
Builds a production-ready image. During the build, dependencies are installed with `uv sync`. 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:
0 commit comments