mirror of
https://github.com/browser-use/web-ui.git
synced 2026-03-22 03:07:54 +08:00
simplify docker installation
This commit is contained in:
@@ -81,7 +81,7 @@ RUN mkdir -p $PLAYWRIGHT_BROWSERS_PATH
|
||||
# Install recommended: Google Chrome (instead of just Chromium for better undetectability)
|
||||
# The 'patchright install chrome' command might download and place it.
|
||||
# The '--with-deps' equivalent for patchright install is to run 'patchright install-deps chrome' after.
|
||||
RUN patchright install chrome --with-deps
|
||||
# RUN patchright install chrome --with-deps
|
||||
|
||||
# Alternative: Install Chromium if Google Chrome is problematic in certain environments
|
||||
RUN patchright install chromium --with-deps
|
||||
|
||||
@@ -43,11 +43,11 @@ services:
|
||||
- BROWSER_USE_LOGGING_LEVEL=${BROWSER_USE_LOGGING_LEVEL:-info}
|
||||
|
||||
# Browser Settings
|
||||
- BROWSER_PATH=/usr/bin/google-chrome
|
||||
- BROWSER_USER_DATA=/app/data/chrome_data
|
||||
- BROWSER_PATH=
|
||||
- BROWSER_USER_DATA=
|
||||
- BROWSER_DEBUGGING_PORT=${BROWSER_DEBUGGING_PORT:-9222}
|
||||
- BROWSER_DEBUGGING_HOST=0.0.0.0
|
||||
- USE_OWN_BROWSER=true
|
||||
- BROWSER_DEBUGGING_HOST=localhost
|
||||
- USE_OWN_BROWSER=false
|
||||
- KEEP_BROWSER_OPEN=true
|
||||
- BROWSER_CDP=${BROWSER_CDP:-} # e.g., http://localhost:9222
|
||||
|
||||
|
||||
@@ -52,7 +52,7 @@ def create_browser_settings_tab(webui_manager: WebuiManager):
|
||||
with gr.Row():
|
||||
use_own_browser = gr.Checkbox(
|
||||
label="Use Own Browser",
|
||||
value=os.getenv("USE_OWN_BROWSER", False),
|
||||
value=False,
|
||||
info="Use your existing browser instance",
|
||||
interactive=True
|
||||
)
|
||||
|
||||
@@ -65,21 +65,6 @@ startretries=5
|
||||
startsecs=3
|
||||
depends_on=x11vnc
|
||||
|
||||
[program:persistent_browser]
|
||||
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"
|
||||
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\""
|
||||
autorestart=true
|
||||
stdout_logfile=/dev/stdout
|
||||
stdout_logfile_maxbytes=0
|
||||
stderr_logfile=/dev/stderr
|
||||
stderr_logfile_maxbytes=0
|
||||
priority=350
|
||||
startretries=5
|
||||
startsecs=10
|
||||
stopsignal=TERM
|
||||
stopwaitsecs=15
|
||||
depends_on=novnc
|
||||
|
||||
[program:webui]
|
||||
command=python webui.py --ip 0.0.0.0 --port 7788
|
||||
directory=/app
|
||||
@@ -92,5 +77,4 @@ priority=400
|
||||
startretries=3
|
||||
startsecs=3
|
||||
stopsignal=TERM
|
||||
stopwaitsecs=10
|
||||
depends_on=persistent_browser
|
||||
stopwaitsecs=10
|
||||
Reference in New Issue
Block a user