From b429644d9e41ff06f29b8f5c69183fecbbe2b2f3 Mon Sep 17 00:00:00 2001 From: Kevin Veen-Birkenbach Date: Tue, 23 Dec 2025 21:54:16 +0100 Subject: [PATCH] Relax Playwright dependency for Nix, pin exact version in Docker - Allow playwright>=1.46.0,<2 in pyproject.toml for Nix compatibility - Add pip constraints.txt to pin playwright==1.46.0 in container builds - Enforce constraints during Docker image build https://chatgpt.com/share/694b0180-2734-800f-830e-44e15d0a527d --- Dockerfile | 3 ++- constraints.txt | 1 + pyproject.toml | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) create mode 100644 constraints.txt diff --git a/Dockerfile b/Dockerfile index c959333..410ab6e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -13,8 +13,9 @@ WORKDIR /app # Option B: build from source (current repo) COPY pyproject.toml README.md LICENSE /app/ +COPY constraints.txt /app/ COPY src /app/src -RUN pip install --no-cache-dir . +RUN pip install --no-cache-dir -c /app/constraints.txt . # Default entrypoint: environment-driven bootstrap ENTRYPOINT ["matomo-bootstrap"] diff --git a/constraints.txt b/constraints.txt new file mode 100644 index 0000000..587c56a --- /dev/null +++ b/constraints.txt @@ -0,0 +1 @@ +playwright==1.46.0 \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index d1f33d7..8b10568 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -12,7 +12,7 @@ authors = [{ name = "Kevin Veen-Birkenbach", email = "kevin@veen.world" }] license = { text = "MIT" } urls = { Homepage = "https://github.com/kevinveenbirkenbach/matomo-bootstrap" } -dependencies = ["playwright==1.46.0"] +dependencies = ["playwright>=1.46.0,<2"] # Provides a stable CLI name for Nix + pip installs: [project.scripts]