initial commit
Python Code Quality / python-code-quality (push) Successful in 9s
Python Test / python-test (push) Failing after 8s

This commit is contained in:
Brian Bjarke Jensen
2025-11-04 21:03:16 +01:00
parent 763c61a280
commit 54f658d093
12 changed files with 683 additions and 11 deletions
+36
View File
@@ -0,0 +1,36 @@
# Use official Python runtime as base image
FROM python:3.12-slim AS base
# Set environment variables
ENV PYTHONUNBUFFERED=1 \
PYTHONDONTWRITEBYTECODE=1 \
PIP_NO_CACHE_DIR=1 \
PIP_DISABLE_PIP_VERSION_CHECK=1 \
UV_PROJECT_ENVIRONMENT=/app/.venv
# Set working directory
WORKDIR /app
# Install uv
COPY --from=ghcr.io/astral-sh/uv:latest /uv /usr/local/bin/uv
# Copy dependency files
COPY pyproject.toml ./
# Install Python dependencies
RUN uv sync --no-dev
# Add virtual environment to PATH
ENV PATH="/app/.venv/bin:$PATH"
# Copy application code
COPY src/ ./src/
# Expose port
EXPOSE 8000
# Set entrypoint to restrict usage to uvicorn with this specific app
ENTRYPOINT ["uvicorn", "src.baby_monitor.main:app"]
# Default arguments
CMD ["--host", "0.0.0.0", "--port", "8000"]