Relax Playwright dependency for Nix, pin exact version in Docker
Some checks failed
ci / tests (push) Has been cancelled

- 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
This commit is contained in:
Kevin Veen-Birkenbach
2025-12-23 21:54:16 +01:00
parent 9fbdce2972
commit b429644d9e
3 changed files with 4 additions and 2 deletions

View File

@@ -13,8 +13,9 @@ WORKDIR /app
# Option B: build from source (current repo) # Option B: build from source (current repo)
COPY pyproject.toml README.md LICENSE /app/ COPY pyproject.toml README.md LICENSE /app/
COPY constraints.txt /app/
COPY src /app/src 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 # Default entrypoint: environment-driven bootstrap
ENTRYPOINT ["matomo-bootstrap"] ENTRYPOINT ["matomo-bootstrap"]

1
constraints.txt Normal file
View File

@@ -0,0 +1 @@
playwright==1.46.0

View File

@@ -12,7 +12,7 @@ authors = [{ name = "Kevin Veen-Birkenbach", email = "kevin@veen.world" }]
license = { text = "MIT" } license = { text = "MIT" }
urls = { Homepage = "https://github.com/kevinveenbirkenbach/matomo-bootstrap" } 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: # Provides a stable CLI name for Nix + pip installs:
[project.scripts] [project.scripts]