BrowserUse_and_ComputerUse_.../docker-compose.yml
Кобылкевич Фёдор d277955a9a add api for post browser-use tasks
2026-04-07 22:01:53 +03:00

97 lines
No EOL
2.3 KiB
YAML

services:
agent:
build:
context: ./hermes_code
dockerfile: Dockerfile
container_name: hermes-brain
env_file:
- .env
environment:
- BROWSER_URL=http://browser:9222
- BROWSER_USE_RPC_URL=http://browser:8787/run
- HERMES_HOME=/app/hermes_data
volumes:
- ./hermes_code:/app/hermes_code:ro
- ./hermes_data:/app/hermes_data:rw
- ./workspace:/app/workspace:rw
- ./config.example.yaml:/app/config.example.yaml:ro
depends_on:
browser:
condition: service_healthy
stdin_open: true
tty: true
restart: always
networks:
- hermes-net
deploy:
resources:
limits:
memory: 1.5G
command: >
bash -c "
if [ ! -f /app/hermes_data/config.yaml ]; then
echo 'Config not found, copying from example...';
cp /app/config.example.yaml /app/hermes_data/config.yaml;
fi;
exec python -m gateway.run
"
browser:
build:
context: ./browser_env
dockerfile: Dockerfile.browser
container_name: hermes-browser
env_file:
- .env
ports:
- "6080:6080"
- "9222:9222"
networks:
hermes-net:
aliases:
- browser
shm_size: '2gb'
volumes:
- browser_profiles:/src/browser_data
restart: always
healthcheck:
test: [ "CMD-SHELL", "curl -fsS http://127.0.0.1:9222/json/version >/dev/null && curl -fsS http://127.0.0.1:8787/health >/dev/null || exit 1" ]
interval: 10s
timeout: 3s
retries: 12
start_period: 20s
browser-api:
build:
context: ./api
dockerfile: Dockerfile
container_name: hermes-browser-api
environment:
- BROWSER_USE_RPC_URL=http://browser:8787/run
- BROWSER_API_HOST=0.0.0.0
- BROWSER_API_PORT=8088
- BROWSER_API_MAX_CONCURRENCY=2
depends_on:
browser:
condition: service_healthy
ports:
- "8088:8088"
restart: always
networks:
- hermes-net
tunnel:
image: cloudflare/cloudflared:latest
profiles:
- remote
container_name: hermes-tunnel
restart: always
command: tunnel --protocol http2 --url http://browser:6080 --no-tls-verify
networks:
- hermes-net
volumes:
browser_profiles:
networks:
hermes-net:
driver: bridge