Files
goclaw/docker-compose.yml
T
Duc NguyenandGitHub 19498bff79 fix(providers): register Ollama in-memory on HTTP create, Docker localhost rewrite (#483)
Closes #470. registerInMemory() skipped Ollama because APIKey was empty.
Add Ollama special case before the key guard (mirrors startup code).

When running in Docker, rewrite localhost → host.docker.internal so the
container can reach the host Ollama instance. Extract InDocker() and
DockerLocalhost() into config/runtime.go for reuse.

Add extra_hosts to docker-compose.yml for Linux compatibility.
2026-03-26 12:45:52 +07:00

76 lines
2.2 KiB
YAML

# Base docker-compose — shared service definition.
# Pre-built images: ghcr.io/nextlevelbuilder/goclaw (also on Docker Hub: digitop/goclaw)
#
# Combine with overlays for your deployment:
#
# Recommended (+ Web Dashboard, pre-built images):
# docker compose -f docker-compose.yml -f docker-compose.postgres.yml -f docker-compose.selfservice.yml up -d
#
# Build from source (add --build):
# docker compose -f docker-compose.yml -f docker-compose.postgres.yml -f docker-compose.selfservice.yml up -d --build
#
# Without dashboard: docker compose -f docker-compose.yml -f docker-compose.postgres.yml up -d
# With OTel tracing: docker compose -f docker-compose.yml -f docker-compose.postgres.yml -f docker-compose.otel.yml up -d --build
# With Claude CLI: add -f docker-compose.claude-cli.yml to auto-sync host ~/.claude credentials
services:
goclaw:
image: ghcr.io/nextlevelbuilder/goclaw:latest
build:
context: .
dockerfile: Dockerfile
args:
ENABLE_OTEL: "${ENABLE_OTEL:-false}"
ENABLE_PYTHON: "${ENABLE_PYTHON:-true}"
ENABLE_FULL_SKILLS: "${ENABLE_FULL_SKILLS:-false}"
VERSION: "${GOCLAW_VERSION:-dev}"
ports:
- "${GOCLAW_PORT:-18790}:18790"
env_file:
- path: .env
required: false
environment:
- GOCLAW_HOST=0.0.0.0
- GOCLAW_PORT=18790
- GOCLAW_CONFIG=/app/data/config.json
- GOCLAW_GATEWAY_TOKEN=${GOCLAW_GATEWAY_TOKEN:-}
- GOCLAW_ENCRYPTION_KEY=${GOCLAW_ENCRYPTION_KEY:-}
- GOCLAW_SKILLS_DIR=/app/data/skills
# Debug
- GOCLAW_TRACE_VERBOSE=${GOCLAW_TRACE_VERBOSE:-0}
volumes:
- goclaw-data:/app/data
- goclaw-workspace:/app/workspace
extra_hosts:
- "host.docker.internal:host-gateway"
security_opt:
- no-new-privileges:true
init: true
cap_drop:
- ALL
cap_add:
- SETUID
- SETGID
- CHOWN
tmpfs:
- /tmp:rw,noexec,nosuid,size=256m
deploy:
resources:
limits:
memory: 1G
cpus: '2.0'
pids: 200
networks:
- default
- goclaw-net
restart: unless-stopped
volumes:
goclaw-data:
goclaw-workspace:
networks:
goclaw-net:
name: goclaw-net
driver: bridge