-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathDockerfile.dev
More file actions
21 lines (15 loc) · 740 Bytes
/
Dockerfile.dev
File metadata and controls
21 lines (15 loc) · 740 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# Development Dockerfile for backend with hot reload
FROM python:3.12-slim
WORKDIR /app
# Install uv for fast Python package management
COPY --from=ghcr.io/astral-sh/uv:latest /uv /usr/local/bin/uv
COPY backend/requirements.txt ./
RUN uv pip install --system --no-cache -r requirements.txt
# Don't copy code - we mount it as volume for hot reload
EXPOSE 8000
# Add healthcheck for development
HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
CMD python -c "import urllib.request; urllib.request.urlopen('http://localhost:8000/api/health')" || exit 1
# Run as non-root user (note: may need adjustment for volume mounts)
USER 1000
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000", "--reload"]