more dockerfile fixing

This commit is contained in:
2025-10-21 01:23:41 +02:00
parent 156a2db485
commit 1bf297752d

View File

@@ -1,6 +1,5 @@
FROM debian:12 AS base FROM debian:12 AS base
WORKDIR /opt/app WORKDIR /opt/app
ENV PYTHONPATH=/app
RUN apt-get update && \ RUN apt-get update && \
apt-get install -y curl unzip cron ca-certificates python3 python3-pip && \ apt-get install -y curl unzip cron ca-certificates python3 python3-pip && \
rm -rf /var/lib/apt/lists/* rm -rf /var/lib/apt/lists/*
@@ -13,15 +12,17 @@ FROM base AS install
RUN mkdir -p /temp/dev RUN mkdir -p /temp/dev
COPY package.json bun.lock /temp/dev/ COPY package.json bun.lock /temp/dev/
RUN cd /temp/dev && bun install --frozen-lockfile 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) # install with --production (exclude devDependencies)
RUN mkdir -p /temp/prod RUN mkdir -p /temp/prod
COPY package.json bun.lock /temp/prod/ COPY package.json bun.lock /temp/prod/
RUN cd /temp/prod && bun install --frozen-lockfile --production 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 # copy node_modules from temp directory
# then copy all (non-ignored) project files into the image # then copy all (non-ignored) project files into the image
FROM base AS prerelease FROM base AS prerelease