refactor: migrate browser gateway to native xvfb
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
# Copy to ~/.config/creatorhub/browser-gateway.env and replace the token.
|
||||
LISTEN_ADDR=0.0.0.0:8081
|
||||
GATEWAY_TOKEN=replace-with-at-least-16-random-characters
|
||||
BROWSER_STATE_DIR=~/.local/state/creatorhub/browser-gateway
|
||||
BROWSER_PROFILE_ROOT=~/.local/share/creatorhub/browser-profiles
|
||||
BROWSER_VERSION=148.0.7778.215
|
||||
BROWSER_PATH=~/.local/share/creatorhub/browsers/fingerprint-chromium/148.0.7778.215/chrome
|
||||
NODE_NAME=
|
||||
RUNTIME_CLEANUP_TIMEOUT=30
|
||||
RUNTIME_READY_TIMEOUT=15
|
||||
RUNTIME_MIN_FREE_BYTES=21474836480
|
||||
RUNTIME_LOG_MAX_BYTES=1073741824
|
||||
PROFILE_CACHE_MAX_BYTES=21474836480
|
||||
# Optional single-node manual observation only: reuse an already-running Xvfb.
|
||||
# Keep this unset for the normal per-runtime isolated Xvfb mode.
|
||||
# RUNTIME_EXTERNAL_DISPLAY=99
|
||||
@@ -0,0 +1,18 @@
|
||||
[Unit]
|
||||
Description=CreatorHub native browser gateway
|
||||
After=graphical-session.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
WorkingDirectory=@PROJECT_DIR@
|
||||
EnvironmentFile=%h/.config/creatorhub/browser-gateway.env
|
||||
ExecStart=/usr/bin/python3 -m cmd.browser_gateway.gateway
|
||||
Restart=on-failure
|
||||
RestartSec=5
|
||||
UMask=0077
|
||||
NoNewPrivileges=yes
|
||||
PrivateTmp=no
|
||||
LimitNOFILE=8192
|
||||
|
||||
[Install]
|
||||
WantedBy=default.target
|
||||
Reference in New Issue
Block a user