FROM node:22-alpine AS node WORKDIR /app COPY package*.json ./ RUN npm ci COPY vite.config.ts . COPY tsconfig.json . COPY package*.json . COPY src ./src COPY index.html . RUN npm run build FROM python:3.14.0-slim as python LABEL org.opencontainers.image.title="Dynavera - An Agentic Approach to Domain-Specific Trainers" LABEL org.opencontainers.image.source="https://git.cs.bham.ac.uk/projects-2025-26/vxn217" LABEL org.opencontainers.image.description="Dynavera (Final Year Project)" ENV PYTHONDONTWRITEBYTECODE=1 ENV PYTHONUNBUFFERED=1 WORKDIR /app RUN apt-get update && apt-get install --no-install-recommends -y \ build-essential \ libpq-dev \ && apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \ && rm -rf /var/lib/apt/lists/* COPY requirements/* . RUN pip install --no-cache-dir -r prod.txt COPY manage.py manage.py COPY config config COPY apps apps COPY --from=node /app/build ./build RUN mkdir -p /app/static COPY ./compose/prod/start /start RUN sed -i 's/\r$//g' /start && chmod +x /start ENTRYPOINT ["/start"]