forked from cartsnitch/cartsnitch
fix: install cartsnitch-common from local monorepo path
The cartsnitch/common GitHub repo has been archived and is being deleted. Replace the git+https pip install with a local COPY of the monorepo's common/ directory, which already contains the full cartsnitch-common Python package. Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
@@ -3,10 +3,9 @@ FROM python:3.12-slim AS build
|
|||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
# git is required to install cartsnitch-common from GitHub; build-essential and
|
# build-essential and libpq-dev are needed to compile any C-extension wheels
|
||||||
# libpq-dev are needed to compile any C-extension wheels (e.g. psycopg2 fallback)
|
# (e.g. psycopg2 fallback). git is no longer needed here.
|
||||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||||
git \
|
|
||||||
libpq-dev \
|
libpq-dev \
|
||||||
build-essential \
|
build-essential \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
@@ -14,13 +13,10 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
|||||||
COPY pyproject.toml ./
|
COPY pyproject.toml ./
|
||||||
COPY src/ ./src/
|
COPY src/ ./src/
|
||||||
|
|
||||||
# cartsnitch-common is not on PyPI — install it directly from GitHub, then
|
# cartsnitch-common is not on PyPI — install it from the local monorepo common/
|
||||||
# install the rest of the package dependencies in a single resolver pass so
|
# directory. The common/ dir is the cartsnitch-common Python package.
|
||||||
# pip can satisfy the cartsnitch-common>=0.1.0 constraint declared in
|
COPY common/ /tmp/common/
|
||||||
# pyproject.toml without hitting PyPI for it.
|
RUN pip install --no-cache-dir --prefix=/install /tmp/common/ .
|
||||||
RUN pip install --no-cache-dir --prefix=/install \
|
|
||||||
"cartsnitch-common @ git+https://github.com/cartsnitch/common.git@76685ed0384103228cd670b477b967e7752ebe6b" \
|
|
||||||
.
|
|
||||||
|
|
||||||
# Stage 2: Production image with Playwright + Chromium
|
# Stage 2: Production image with Playwright + Chromium
|
||||||
FROM python:3.12-slim AS prod
|
FROM python:3.12-slim AS prod
|
||||||
|
|||||||
Reference in New Issue
Block a user