Some checks failed
Tests / Frontend Linting (push) Has been cancelled
Tests / Build Base Setup Image (push) Successful in 1m22s
Tests / Build Frontend Environment (push) Failing after 12m33s
Tests / Build Backend Environment (push) Failing after 12m37s
Tests / Backend Tests (push) Has been cancelled
Tests / Backend Linting (push) Has been cancelled
Tests / Frontend Tests (push) Has been cancelled
Signed-off-by: Cliff Hill <xlorep@darkhelm.org>
45 lines
1.2 KiB
Docker
45 lines
1.2 KiB
Docker
# CICD Backend - Extends setup with Python environment
|
|
FROM cicd-setup:latest
|
|
|
|
# Install Python 3.13 and system dependencies
|
|
RUN apt-get update && apt-get install -y \
|
|
software-properties-common \
|
|
&& add-apt-repository ppa:deadsnakes/ppa \
|
|
&& apt-get update && apt-get install -y \
|
|
python3.13 \
|
|
python3.13-venv \
|
|
python3.13-dev \
|
|
build-essential \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
# Install uv package manager
|
|
COPY --from=ghcr.io/astral-sh/uv:latest /uv /bin/uv
|
|
|
|
# Set working directory to backend
|
|
WORKDIR /workspace/backend
|
|
|
|
# Create and activate virtual environment
|
|
ENV VIRTUAL_ENV=/workspace/backend/.venv
|
|
RUN uv venv $VIRTUAL_ENV
|
|
ENV PATH="$VIRTUAL_ENV/bin:$PATH"
|
|
|
|
# Install backend dependencies in dev mode (includes ruff, pyright, darglint, etc.)
|
|
RUN uv sync --dev
|
|
|
|
# Install the backend package in development mode
|
|
RUN uv pip install -e .
|
|
|
|
# Set Python path for imports
|
|
ENV PYTHONPATH=/workspace/backend/src:/workspace/backend
|
|
|
|
# Verify tools are available
|
|
RUN which ruff && ruff --version
|
|
RUN which pyright && pyright --version
|
|
RUN which darglint && darglint --version
|
|
|
|
# Set working directory back to workspace root for flexibility
|
|
WORKDIR /workspace
|
|
|
|
# Default command
|
|
CMD ["/bin/bash"]
|