mirror of
https://github.com/ThePhaseless/Byparr.git
synced 2026-09-24 14:20:08 +01:00
feat: migrate to cloverlabs-camoufox, pin playwright<1.61, add tini as PID 1
- Migrate from daijro/camoufox==0.4.* to cloverlabs-camoufox==0.6.* (drop-in API: same import path, same kwargs) - Pin playwright>=1.58,<1.61 to prevent protocol error (Browser.setDefaultViewport viewport.isMobile incompatibility with camoufox bundled Firefox v135.0.1-beta.24; upstream daijro/camoufox#653) - Bump fastapi 0.136->0.139, pytest 9.0->9.1, pytest-asyncio 1.3->1.4 (absorbs Renovate PRs #360, #359, #357) - Remove dead deptry DEP002 pyautogui ignore (cloverlabs dropped pyautogui) - Add tini to Dockerfile base image and set as ENTRYPOINT PID 1 (fixes zombie/defunct Firefox subprocesses: [Socket Process], [RDD Process], [Utility Process] — verified: 21 zombies without tini, 0 zombies with tini after 5 POST /v1 requests) - Remove init: true from compose.yaml (tini makes it redundant) - Remove --init/init: true checkbox from bug report template Closes #339, #340, #360, #359, #357, #366
This commit is contained in:
@@ -9,7 +9,6 @@ body:
|
||||
label: "I've completed the following steps:"
|
||||
options:
|
||||
- label: Read Loop Warning on Readme
|
||||
- label: "Used --init/init: true in docker run/compose.yaml"
|
||||
- label: Done the troubleshooting from Readme
|
||||
- label: Checked if such issue already exists
|
||||
- label: Checked other websites with Cloudflare Turnstile
|
||||
|
||||
+2
-2
@@ -18,7 +18,7 @@ ENV GITHUB_BUILD=${GITHUB_BUILD}\
|
||||
HOME=/tmp
|
||||
|
||||
RUN apt-get update &&\
|
||||
apt-get install -y --no-install-recommends curl ca-certificates &&\
|
||||
apt-get install -y --no-install-recommends curl ca-certificates tini &&\
|
||||
apt-get clean &&\
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/
|
||||
@@ -60,4 +60,4 @@ FROM app
|
||||
USER 1000
|
||||
EXPOSE $PORT
|
||||
HEALTHCHECK --interval=15m --timeout=30s --start-period=5s --retries=3 CMD curl "http://localhost:${PORT}/health"
|
||||
ENTRYPOINT ["/app/.venv/bin/python", "main.py"]
|
||||
ENTRYPOINT ["tini", "--", "/app/.venv/bin/python", "main.py"]
|
||||
|
||||
@@ -2,7 +2,6 @@ services:
|
||||
byparr:
|
||||
image: ghcr.io/thephaseless/byparr:latest
|
||||
restart: unless-stopped
|
||||
init: true
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
|
||||
+6
-9
@@ -8,27 +8,24 @@ version = "0.1.0"
|
||||
description = "API for getting cookies for Cloudflare challenges"
|
||||
readme = "README.md"
|
||||
dependencies = [
|
||||
"camoufox[geoip]==0.4.*",
|
||||
"fastapi[standard]==0.136.*",
|
||||
"cloverlabs-camoufox[geoip]==0.6.*",
|
||||
"fastapi[standard]==0.139.*",
|
||||
"playwright>=1.58,<1.61",
|
||||
"playwright-captcha==0.1.*",
|
||||
"pydantic==2.*",
|
||||
]
|
||||
urls = { repository = "https://github.com/ThePhaseless/Byparr" }
|
||||
|
||||
[dependency-groups]
|
||||
|
||||
test = [
|
||||
"httpx==0.28.*",
|
||||
"pytest==9.0.*",
|
||||
"pytest-asyncio==1.3.*",
|
||||
"pytest==9.1.*",
|
||||
"pytest-asyncio==1.4.*",
|
||||
"pytest-retry==1.7.*",
|
||||
"pytest-xdist==3.8.*",
|
||||
"setuptools>=80.9.0",
|
||||
]
|
||||
dev = ["deptry==0.25.*", "ruff==0.15.*"]
|
||||
|
||||
[tool.deptry.per_rule_ignores]
|
||||
DEP002 = ["pyautogui"]
|
||||
|
||||
[tool.ruff.lint]
|
||||
ignore = [
|
||||
"D203",
|
||||
|
||||
Reference in New Issue
Block a user