Docker Image and first iteration

This commit is contained in:
boris committed 2026-06-02 12:27:54 +02:00
1 parent 723b64b1c4
commit bd9209ebb7
40 files changed
+26643

No files matched your search

+33
View File
@@ -0,0 +1,33 @@
FROM node:24-bookworm-slim AS frontend-deps
WORKDIR /app/frontend
COPY frontend/package*.json ./
RUN npm ci
FROM frontend-deps AS frontend-builder
COPY frontend ./
RUN npm run build
FROM python:3.12-slim-bookworm
ENV PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1
WORKDIR /app
RUN addgroup --system django \
&& adduser --system --ingroup django django
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY --chown=django:django . .
COPY --from=frontend-builder --chown=django:django /app/showcase/static/showcase/dist ./showcase/static/showcase/dist
USER django
EXPOSE 8000
CMD ["python", "manage.py", "runserver", "0.0.0.0:8000"]