|
@@ -0,0 +1,23 @@
|
|
|
|
+FROM python:3.12-alpine as base
|
|
|
|
+
|
|
|
|
+ENV LANG=C.UTF-8
|
|
|
|
+ENV LC_ALL=C.UTF-8
|
|
|
|
+ENV PYTHONUNBUFFERED=1
|
|
|
|
+
|
|
|
|
+RUN adduser --system --no-create-home kinema-zetel
|
|
|
|
+RUN mkdir /app
|
|
|
|
+WORKDIR /app
|
|
|
|
+RUN --mount=type=cache,target=/root/.cache/pip pip install -U pip pip-tools
|
|
|
|
+USER root
|
|
|
|
+
|
|
|
|
+FROM base as prod
|
|
|
|
+COPY requirements.txt /app/requirements.txt
|
|
|
|
+RUN pip install -r requirements.txt
|
|
|
|
+RUN --mount=type=cache,target=/root/.cache/pip pip install -r requirements.txt
|
|
|
|
+COPY . .
|
|
|
|
+RUN --mount=type=cache,target=/root/.cache/pip pip install -e . --no-deps
|
|
|
|
+USER kinema-zetel
|
|
|
|
+CMD [ "python", "-m", "kinema-zetel"]
|
|
|
|
+
|
|
|
|
+from prod as dev
|
|
|
|
+USER root
|