lazyBoy/docker-compose.yml

114 lines
3.3 KiB
YAML
Raw Normal View History

2026-09-03 12:46:14 +00:00
services:
postgres:
restart: unless-stopped
networks: [database]
logging: &bounded-logs
driver: json-file
options: {max-size: "10m", max-file: "3"}
2026-09-03 23:43:37 +00:00
image: pgvector/pgvector:pg16
2026-09-03 12:46:14 +00:00
environment:
POSTGRES_USER: lazyboy
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-lazyboy}
2026-09-03 12:46:14 +00:00
POSTGRES_DB: lazyboy
volumes:
- pgdata:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U lazyboy"]
interval: 3s
timeout: 5s
retries: 20
computer:
image: lazyboy/computer:local
build:
context: .
dockerfile: image/computer/Dockerfile
command: ["true"]
restart: "no"
network_mode: none
supervisor:
restart: unless-stopped
init: true
networks: [control]
logging: *bounded-logs
security_opt: ["no-new-privileges:true"]
cap_drop: [ALL]
cap_add: [CHOWN, DAC_OVERRIDE]
read_only: true
healthcheck:
test: ["CMD", "/usr/local/bin/lazyboy-supervisor", "--healthcheck"]
interval: 5s
timeout: 4s
retries: 12
2026-09-03 12:46:14 +00:00
build:
context: .
dockerfile: image/supervisor/Dockerfile
environment:
2026-09-03 23:43:37 +00:00
SANDBOX_SUPERVISOR_TOKEN: ${SANDBOX_SUPERVISOR_TOKEN:?Set SANDBOX_SUPERVISOR_TOKEN in .env}
2026-09-03 12:46:14 +00:00
LAZYBOY_COMPUTER_IMAGE: lazyboy/computer:local
SUPERVISOR_BIND: 0.0.0.0:7091
DATA_DIR: /data
HOST_DATA_DIR: ${LAZYBOY_HOST_DATA_DIR:-${PWD}/data}
2026-09-03 12:46:14 +00:00
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ./data:/data
extra_hosts:
- "host.docker.internal:host-gateway"
depends_on:
computer:
condition: service_completed_successfully
api:
restart: unless-stopped
init: true
networks: [database, control, egress]
logging: *bounded-logs
security_opt: ["no-new-privileges:true"]
cap_drop: [ALL]
pids_limit: 256
2026-09-03 12:46:14 +00:00
build:
context: .
dockerfile: image/api/Dockerfile
environment:
DATABASE_URL: postgres://lazyboy:${POSTGRES_PASSWORD:-lazyboy}@postgres:5432/lazyboy
2026-09-03 12:46:14 +00:00
SANDBOX_SUPERVISOR_URL: http://supervisor:7091
2026-09-03 23:43:37 +00:00
SANDBOX_SUPERVISOR_TOKEN: ${SANDBOX_SUPERVISOR_TOKEN:?Set SANDBOX_SUPERVISOR_TOKEN in .env}
LAZYBOY_APP_TOKEN: ${LAZYBOY_APP_TOKEN:?Set LAZYBOY_APP_TOKEN in .env}
LAZYBOY_VAULT_KEY: ${LAZYBOY_VAULT_KEY:-}
2026-09-03 23:43:37 +00:00
LAZYBOY_SECURE_COOKIE: ${LAZYBOY_SECURE_COOKIE:-false}
2026-09-03 12:46:14 +00:00
SANDBOX_PROVIDER: docker
DATA_DIR: /data
HOST_DATA_DIR: ${LAZYBOY_HOST_DATA_DIR:-${PWD}/data}
2026-09-03 12:46:14 +00:00
API_BIND: 0.0.0.0:3100
XAI_API_KEY: ${XAI_API_KEY:-}
2026-09-04 09:08:56 +00:00
OPENCODE_GO_API_KEY: ${OPENCODE_GO_API_KEY:-}
OPENAI_API_KEY: ${OPENAI_API_KEY:-}
2026-09-03 23:43:37 +00:00
LAZYBOY_MEMORY_ENABLED: ${LAZYBOY_MEMORY_ENABLED:-true}
LAZYBOY_MEMORY_MODEL_CACHE: /data/fastembed
LAZYBOY_MEMORY_TOP_K: ${LAZYBOY_MEMORY_TOP_K:-8}
LAZYBOY_MEMORY_BYTE_BUDGET: ${LAZYBOY_MEMORY_BYTE_BUDGET:-6000}
2026-09-03 12:46:14 +00:00
LAZYBOY_WEB_DIR: /web
LAZYBOY_SCREEN_UPSTREAM: host.docker.internal
ports:
- "${LAZYBOY_BIND_IP:-127.0.0.1}:3101:3100"
2026-09-03 12:46:14 +00:00
volumes:
- ./data:/data
extra_hosts:
- "host.docker.internal:host-gateway"
depends_on:
postgres:
condition: service_healthy
supervisor:
condition: service_healthy
2026-09-03 12:46:14 +00:00
volumes:
pgdata:
networks:
database:
internal: true
control:
internal: true
egress: {}