Skip to content

Commit 40fdf38

Browse files
committed
Install watchfiles to reload application when changing the .env file
1 parent d410329 commit 40fdf38

File tree

3 files changed

+743
-651
lines changed

3 files changed

+743
-651
lines changed

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@ filterwarnings = [
107107
dev = [
108108
"pre-commit>=4.3.0",
109109
"pytest-asyncio>=1.0.0",
110+
"watchfiles>=1.1.1",
110111
]
111112

112113
[tool.mypy]

scripts/local_with_uvicorn/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,5 +40,5 @@ USER app
4040
WORKDIR /code
4141

4242
# -------- replace with comment to run with gunicorn --------
43-
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000", "--reload"]
43+
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000", "--reload", "--reload-include", ".env"]
4444
# CMD ["gunicorn", "app.main:app", "-w", "4", "-k", "uvicorn.workers.UvicornWorker", "-b", "0.0.0.0:8000"]

0 commit comments

Comments
 (0)