mirror of
https://github.com/ThePhaseless/Byparr.git
synced 2026-09-24 06:10:14 +01:00
fix: handle zombie processes
This commit is contained in:
+2
-2
@@ -16,7 +16,7 @@ ENV GITHUB_BUILD=${GITHUB_BUILD}\
|
||||
WORKDIR /app
|
||||
|
||||
RUN apt-get update && \
|
||||
apt-get install -y --no-install-recommends --no-install-suggests xauth xvfb scrot curl chromium chromium-driver ca-certificates
|
||||
apt-get install -y --no-install-recommends --no-install-suggests xauth xvfb scrot curl chromium chromium-driver ca-certificates tini
|
||||
|
||||
ADD https://astral.sh/uv/install.sh install.sh
|
||||
RUN sh install.sh && uv --version
|
||||
@@ -44,4 +44,4 @@ RUN ./test.sh
|
||||
FROM app
|
||||
EXPOSE 8191
|
||||
HEALTHCHECK --interval=15m --timeout=30s --start-period=5s --retries=3 CMD [ "curl", "http://localhost:8191/health" ]
|
||||
ENTRYPOINT ["uv", "run", "main.py"]
|
||||
ENTRYPOINT ["/usr/bin/tini", "--", "uv", "run", "main.py"]
|
||||
|
||||
+7
-2
@@ -27,14 +27,19 @@ def get_sb(
|
||||
detail="SOCKS5 proxy with authentication is not supported. Check README for more info.",
|
||||
)
|
||||
|
||||
with SB(
|
||||
sb_ctx = SB(
|
||||
uc=True,
|
||||
headless=USE_HEADLESS,
|
||||
locale_code="en",
|
||||
ad_block=True,
|
||||
proxy=proxy,
|
||||
) as sb:
|
||||
)
|
||||
sb = sb_ctx.__enter__()
|
||||
try:
|
||||
yield sb
|
||||
finally:
|
||||
sb_ctx.__exit__(None, None, None)
|
||||
|
||||
|
||||
|
||||
def save_screenshot(sb: BaseCase):
|
||||
|
||||
Reference in New Issue
Block a user