Dynavera/compose/dev/python/Dockerfile

36 lines
666 B
Text
Raw Normal View History

FROM node:22-alpine AS node
WORKDIR /app
COPY package*.json ./
RUN npm ci
COPY src ./src
COPY index.html .
COPY vite.config.* .
COPY tsconfig.* .
RUN npm run build
FROM python:3.14.0-bookworm as python
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/*
2025-11-27 15:20:42 +00:00
COPY requirements/* .
RUN pip install --no-cache-dir --requirement local.txt
WORKDIR /app
COPY . .
COPY --from=node /app/build ./build
COPY ./compose/prod/start /start
RUN sed -i 's/\r$//g' /start
RUN chmod +x /start
ENTRYPOINT ["/start"]