-
Notifications
You must be signed in to change notification settings - Fork 706
Expand file tree
/
Copy pathdocker-compose.browser.yml
More file actions
39 lines (37 loc) · 1.08 KB
/
docker-compose.browser.yml
File metadata and controls
39 lines (37 loc) · 1.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# Browser sidecar overlay — adds headless Chrome for the browser automation tool.
#
# Usage:
# docker compose -f docker-compose.yml -f docker-compose.postgres.yml -f docker-compose.browser.yml up -d --build
#
# The Chrome sidecar exposes CDP (Chrome DevTools Protocol) on port 9222.
# GoClaw connects to it automatically via GOCLAW_BROWSER_REMOTE_URL.
services:
chrome:
image: zenika/alpine-chrome:124
command:
- --no-sandbox
- --remote-debugging-address=0.0.0.0
- --remote-debugging-port=9222
- --remote-allow-origins=*
- --disable-gpu
- --disable-dev-shm-usage
ports:
- "${CHROME_CDP_PORT:-9222}:9222"
shm_size: 2gb
healthcheck:
test: ["CMD-SHELL", "wget -qO- http://127.0.0.1:9222/json/version >/dev/null 2>&1"]
interval: 5s
timeout: 3s
retries: 5
deploy:
resources:
limits:
memory: 2G
cpus: '2.0'
restart: unless-stopped
goclaw:
environment:
- GOCLAW_BROWSER_REMOTE_URL=ws://chrome:9222
depends_on:
chrome:
condition: service_healthy