Skip to content

Commit 30f1219

Browse files
committed
fix docker file
1 parent b7c8fe1 commit 30f1219

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

docker-compose.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,9 @@ services:
4646
- BROWSER_PATH=/usr/bin/google-chrome
4747
- BROWSER_USER_DATA=/app/data/chrome_data
4848
- BROWSER_DEBUGGING_PORT=${BROWSER_DEBUGGING_PORT:-9222}
49-
- BROWSER_DEBUGGING_HOST=${BROWSER_DEBUGGING_HOST:-0.0.0.0}
50-
- KEEP_BROWSER_OPEN=${KEEP_BROWSER_OPEN:-true}
49+
- BROWSER_DEBUGGING_HOST=0.0.0.0
50+
- USE_OWN_BROWSER=true
51+
- KEEP_BROWSER_OPEN=true
5152
- BROWSER_CDP=${BROWSER_CDP:-} # e.g., http://localhost:9222
5253

5354
# Display Settings

src/webui/components/browser_settings_tab.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ def create_browser_settings_tab(webui_manager: WebuiManager):
5252
with gr.Row():
5353
use_own_browser = gr.Checkbox(
5454
label="Use Own Browser",
55-
value=False,
55+
value=os.getenv("USE_OWN_BROWSER", False),
5656
info="Use your existing browser instance",
5757
interactive=True
5858
)

supervisord.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ depends_on=x11vnc
6767

6868
[program:persistent_browser]
6969
environment=START_URL="data:text/html,<html><body><h1>Browser Ready</h1></body></html>",BROWSER_USER_DATA="/app/data/chrome_data",BROWSER_DEBUGGING_PORT="%(ENV_BROWSER_DEBUGGING_PORT)s",BROWSER_DEBUGGING_HOST="%(ENV_BROWSER_DEBUGGING_HOST)s"
70-
command=bash -c "mkdir -p %(ENV_BROWSER_USER_DATA)s && sleep 8 && $(find $PLAYWRIGHT_BROWSERS_PATH/chrome-*/chrome-linux -name chrome || find /root/.cache/ms-playwright/chrome-*/chrome-linux -name chrome || find /opt/google/chrome -name chrome || echo \"/usr/bin/google-chrome-stable\") --user-data-dir=%(ENV_BROWSER_USER_DATA)s --window-position=0,0 --window-size=%(ENV_RESOLUTION_WIDTH)s,%(ENV_RESOLUTION_HEIGHT)s --start-maximized --no-sandbox --disable-dev-shm-usage --disable-gpu --disable-software-rasterizer --disable-setuid-sandbox --no-first-run --no-default-browser-check --no-experiments --ignore-certificate-errors --remote-debugging-port=%(ENV_BROWSER_DEBUGGING_PORT)s --remote-debugging-address=%(ENV_BROWSER_DEBUGGING_HOST)s --enable-features=NetworkService,NetworkServiceInProcess --disable-features=ImprovedCookieControls \"$START_URL\""
70+
command=bash -c "mkdir -p %(ENV_BROWSER_USER_DATA)s && sleep 8 && $(/usr/bin/google-chrome || find $PLAYWRIGHT_BROWSERS_PATH/chromium-*/chrome-linux -name chrome) --user-data-dir=%(ENV_BROWSER_USER_DATA)s --window-position=0,0 --window-size=%(ENV_RESOLUTION_WIDTH)s,%(ENV_RESOLUTION_HEIGHT)s --start-maximized --no-sandbox --disable-dev-shm-usage --disable-gpu --no-first-run --no-default-browser-check --no-experiments --ignore-certificate-errors --remote-debugging-port=%(ENV_BROWSER_DEBUGGING_PORT)s --remote-debugging-address=%(ENV_BROWSER_DEBUGGING_HOST)s --enable-features=NetworkService,NetworkServiceInProcess --disable-features=ImprovedCookieControls \"$START_URL\""
7171
autorestart=true
7272
stdout_logfile=/dev/stdout
7373
stdout_logfile_maxbytes=0

0 commit comments

Comments
 (0)