Skip to content

Commit 94cf08b

Browse files
committed
docker: update dockerfile for fastapi
1 parent 60dc1ec commit 94cf08b

File tree

3 files changed

+10
-5
lines changed

3 files changed

+10
-5
lines changed

Dockerfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ RUN --mount=type=cache,target=/root/.cache/uv \
2020

2121
# Then, use a final image without uv
2222
FROM python:3.11-alpine3.20
23+
RUN apk add ffmpeg
24+
2325
# It is important to use the image that matches the builder, as the path to the
2426
# Python executable must be the same, e.g., using `python:3.11-slim-bookworm`
2527
# will fail.
@@ -32,4 +34,4 @@ COPY --from=builder --chown=app:app /app .
3234
# Place executables in the environment at the front of the path
3335
ENV PATH="/app/.venv/bin:$PATH"
3436

35-
CMD ["python", "main.py", "daemon"]
37+
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000"]

pyproject.toml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ dependencies = [
1313
"pydantic-settings>=2.10.1",
1414
"requests>=2.32.4",
1515
"uvicorn>=0.35.0",
16+
"watchdog>=6.0.0",
17+
"werkzeug>=3.1.3",
1618
]
1719

1820
[dependency-groups]
@@ -26,7 +28,6 @@ dev = [
2628
"pytest-httpserver>=1.1.3",
2729
"ruff>=0.12.3",
2830
"tuspy>=1.1.0",
29-
"watchdog>=6.0.0",
3031
]
3132

3233
[tool.ruff]
@@ -54,4 +55,4 @@ log_cli_level = "INFO"
5455
[tool.uv.sources]
5556
frikanalen-django-api-client = { git = "https://github.com/frikanalen/frikanalen-python-client.git", rev = "main" }
5657
[tool.ruff.flake8-bugbear]
57-
extend-immutable-calls = ["fastapi.Depends", "fastapi.params.Depends", "fastapi.Query", "fastapi.params.Query"]
58+
extend-immutable-calls = ["fastapi.Depends", "fastapi.params.Depends", "fastapi.Query", "fastapi.params.Query"]

uv.lock

Lines changed: 4 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)