Repository navigation
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
67 lines (64 loc) · 2.73 KB
/
Copy pathdocker-compose.yml
File metadata and controls
67 lines (64 loc) · 2.73 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
# Fixes the project name. Compose otherwise derives it from the directory the
# repo happens to sit in, which names the images, network and data volume after
# that folder rather than after the product.
name: oya-browser
services:
server:
build: .
ports:
- "${PORT:-3100}:3100"
# Everything `oya install` writes reaches the container this way. Listing
# vars individually meant each new setting (LLM key, provider, fleet
# runtime) silently never arrived; the file is the contract instead.
#
# The KEK for credentials at rest, OYA_PROFILE_SECRET, lives in there too.
# Left unset, the server generates one into the data volume — which is why
# that volume must outlive the container, or every stored credential
# becomes unreadable.
env_file:
- path: .env
required: false
environment:
- PORT=3100
volumes:
# Personas, key settings, cookies and the generated secret. Without
# Supabase this is the only durable state there is.
- oya-data:/app/data
restart: unless-stopped
browser:
build: browser
# Deliberately no `env_file: .env` here. This is the container that renders
# whatever page an agent is pointed at, and .env holds SUPABASE_SERVICE_KEY,
# OPENAI_API_KEY, DAYTONA_API_KEY and OYA_PROFILE_SECRET — the KEK for every
# credential at rest. One renderer compromise should not reach the database
# and the encryption key. Everything the browser actually reads is listed
# below; k8s/base/browser.yaml has always been explicit the same way.
environment:
# Reached over the compose network, so it overrides any public URL in .env.
- OYA_SERVER_URL=ws://server:3100/ws
- OYA_API_KEY=${API_KEYS:-}
- OYA_AUTO_CONNECT=true
- OYA_BROWSER_NAME=${BROWSER_NAME:-Oya Browser Docker}
- OYA_PERSONA=${OYA_PERSONA:-}
- OYA_PROVIDER=${OYA_PROVIDER:-}
- OYA_GOVERNANCE=${OYA_GOVERNANCE:-}
- SCREEN_WIDTH=${SCREEN_WIDTH:-1920}
- SCREEN_HEIGHT=${SCREEN_HEIGHT:-1080}
- VNC_ENABLED=${VNC_ENABLED:-false}
- VNC_PORT=5900
# A range, not a single port: `--scale browser=N` starts N containers and a
# fixed host port means the second one fails to bind. Each replica takes the
# next free port in the range.
#
# Bound to the host's loopback: x11vnc runs with -nopw and -shared, so an
# interface-wide bind hands full keyboard and mouse control of a browser
# holding the persona's logged-in sessions to anyone who can reach the port.
# Reach it over an SSH tunnel: ssh -L 5900:127.0.0.1:5900 <host>
ports:
- "127.0.0.1:${VNC_PORT_RANGE:-5900-5999}:5900"
depends_on:
- server
shm_size: '2gb'
restart: unless-stopped
volumes:
oya-data: