From 1bf297752d8ea42e11e45e8cb892d6d3606e16a0 Mon Sep 17 00:00:00 2001 From: chiko Date: Tue, 21 Oct 2025 01:23:41 +0200 Subject: [PATCH] more dockerfile fixing --- Dockerfile | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index 1c38a6d..f5c1d1e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,5 @@ FROM debian:12 AS base WORKDIR /opt/app -ENV PYTHONPATH=/app RUN apt-get update && \ apt-get install -y curl unzip cron ca-certificates python3 python3-pip && \ rm -rf /var/lib/apt/lists/* @@ -13,15 +12,17 @@ FROM base AS install RUN mkdir -p /temp/dev COPY package.json bun.lock /temp/dev/ RUN cd /temp/dev && bun install --frozen-lockfile -# and install python dependencies -COPY ./requirements.txt . -RUN python3 -m pip install --break-system-packages -r requirements.txt -# RUN python3 -m pip install -U python-dotenv + # install with --production (exclude devDependencies) RUN mkdir -p /temp/prod COPY package.json bun.lock /temp/prod/ RUN cd /temp/prod && bun install --frozen-lockfile --production +# and install python dependencies +COPY ./requirements.txt . +RUN python3 -m pip install --break-system-packages -r requirements.txt +# RUN python3 -m pip install -U python-dotenv + # copy node_modules from temp directory # then copy all (non-ignored) project files into the image FROM base AS prerelease