-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.dev.yml
More file actions
81 lines (78 loc) · 2.79 KB
/
Copy pathdocker-compose.dev.yml
File metadata and controls
81 lines (78 loc) · 2.79 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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
###############################################################################
# pi-chrome-bot — agent + chrome stack (development)
#
# Two services sharing one network namespace (pi uses
# network_mode: service:chrome):
#
# chrome linuxserver/chromium + internal Selkies desktop + DevTools on
# 127.0.0.1:9222 (loopback only).
# pi pi-web + an in-container nginx that terminates TLS and
# reverse-proxies Selkies + the
# watch-the-browser widget. Agent drives Chrome via agent_browser
# → CDP http://127.0.0.1:9222 (same netns, direct connect).
#
# Run:
# make build
# make up
# open https://localhost:30141 # pi-web + embedded Chrome
#
# After switching from pi-webui, drop the old npm_global once so the volume
# picks up image-baked pi-web:
# docker compose -f docker-compose.dev.yml stop pi && \
# docker compose -f docker-compose.dev.yml rm -f pi && \
# docker volume rm pi-chrome-bot_npm_global && make up
#
# Upgrading from the old 3-service stack: run
# `docker compose down` first, then `make up` with this file. The
# `cdp-proxy` container disappearing is expected — its TLS/proxy logic now
# runs inside the `pi` container.
###############################################################################
services:
chrome:
image: lscr.io/linuxserver/chromium:latest
restart: unless-stopped
environment:
- PUID=1000
- PGID=1000
# - TZ=Asia/Shanghai
# - LC_ALL=zh_CN.UTF-8
- CHROME_CLI=--remote-debugging-port=9222 --remote-debugging-address=127.0.0.1 --remote-allow-origins=http://localhost --no-first-run
- SELKIES_MANUAL_WIDTH=1920
- SELKIES_MANUAL_HEIGHT=1080
- SELKIES_IS_MANUAL_RESOLUTION_MODE=true
ports:
# pi shares this service's network namespace. Docker requires port
# publishing on chrome, but every target below is pi's Nginx listener.
# Defaults to all IPv4 interfaces. To make it local-only, use:
# - "127.0.0.1:30141:8443"
- "30141:8443"
shm_size: "2gb"
volumes:
- ./data/chrome:/config
pi:
build:
context: ./app
args:
NODE_VERSION: "24.18.0"
PI_VERSION: "0.82.1"
AGENT_BROWSER_VERSION: "0.33.0"
PI_WEB_VERSION: "0.8.1"
NPM_REGISTRY: ""
image: pi-chrome-bot/pi:local
restart: unless-stopped
network_mode: "service:chrome"
environment:
# Optional SAN override for the auto-generated self-signed certificate:
# - PUBLIC_HOST=pi-bot.lan
- PI_WEB_PORT=30141
- TZ=Asia/Shanghai
volumes:
- ./data/app:/root
# Persistent TLS certificate for the public proxy.
- ./data/proxy:/etc/nginx/certs
# Global CLIs: pi, agent-browser, pi-web
- npm_global:/opt/npm-global
depends_on:
- chrome
volumes:
npm_global: