Files
openhuman/docker-compose.yml
T
+16 2e5b5e7b23 Promote main → release (#5203)
Co-authored-by: YellowSnnowmann <167776381+YellowSnnowmann@users.noreply.github.com>
Co-authored-by: Steven Enamakel <31011319+senamakel@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Cyrus Gray <144336577+graycyrus@users.noreply.github.com>
Co-authored-by: Horst1993 <horst.w@gmicloud.ai>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: James Gentes <jgentes@users.noreply.github.com>
Co-authored-by: Sam <samrusani@users.noreply.github.com>
Co-authored-by: Sami Rusani <14844597+samrusani@users.noreply.github.com>
Co-authored-by: oxoxDev <164490987+oxoxDev@users.noreply.github.com>
Co-authored-by: Muhammad Ismail <78064250+myi1@users.noreply.github.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Co-authored-by: nb213 <binyangzhu000@gmail.com>
Co-authored-by: binyangzhu000-sudo <224954946+binyangzhu000-sudo@users.noreply.github.com>
Co-authored-by: Steven Enamakel <enamakel@tinyhumans.ai>
Co-authored-by: CodeGhost21 <164498022+CodeGhost21@users.noreply.github.com>
Co-authored-by: sanil-23 <sanil@tinyhumans.ai>
Co-authored-by: M3gA-Mind <elvin@mahadao.com>
Co-authored-by: oxoxDev <oxoxdev@users.noreply.github.com>
Co-authored-by: mysma-9403 <64923976+mysma-9403@users.noreply.github.com>
Co-authored-by: mwakidenis <mwakidenice@gmail.com>
Co-authored-by: NgoQuocViet2001 <123613986+NgoQuocViet2001@users.noreply.github.com>
Co-authored-by: viet.ngo <viet.ngo@sotatek.com>
Co-authored-by: Maciej Myszkiewicz <mmyszkiewicz@bwcoders.com>
2026-07-27 11:49:45 +05:30

75 lines
2.7 KiB
YAML

# OpenHuman Core — Docker Compose for self-hosted cloud deploy.
#
# Brings up the headless Rust core (`openhuman-core`) on :7788, persists the
# workspace to a named volume, and reads secrets/config from a `.env` file
# next to this compose file.
#
# Usage:
# 1. cp .env.example .env (then edit values — at minimum BACKEND_URL and
# OPENHUMAN_CORE_TOKEN; the latter is required for any client that calls
# /rpc on this instance)
# 2. docker compose up -d
# 3. curl http://localhost:7788/health
#
# The image is built from the repo Dockerfile. To pin a published image
# instead of building, replace `build:` with `image: ghcr.io/.../openhuman-core:<tag>`.
services:
openhuman-core:
build:
context: .
dockerfile: Dockerfile
image: openhuman-core:local
container_name: openhuman-core
restart: unless-stopped
read_only: true
security_opt:
- no-new-privileges:true
cap_drop:
- ALL
# The entrypoint starts as root so it can repair the ownership of a volume
# Docker created as root:root, then drops to the `openhuman` user. Both
# steps need capabilities that `cap_drop: ALL` removes:
# CHOWN — heal mis-owned workspace files (scripts/docker-entrypoint-core.sh)
# SETUID/SETGID — gosu's privilege drop; without them the container
# crash-loops before openhuman-core ever starts.
# Deny-by-default is preserved: these three are the entire grant.
# Alternative if you prefer zero capabilities: pin `user: "10001:10001"`,
# which makes the entrypoint exec the binary directly and skip the heal —
# at the cost of no longer being able to repair a root-owned volume.
cap_add:
- CHOWN
- SETUID
- SETGID
tmpfs:
- /tmp
ports:
- "${OPENHUMAN_CORE_PORT:-7788}:7788"
env_file:
- path: .env
required: false
environment:
# Bind to 0.0.0.0 inside the container so port-forwarding works regardless
# of what `.env` says. The Dockerfile already sets this default, but make
# it explicit so an inherited shell value cannot override it.
OPENHUMAN_CORE_HOST: 0.0.0.0
OPENHUMAN_CORE_PORT: "7788"
OPENHUMAN_WORKSPACE: /home/openhuman/.openhuman
XDG_CACHE_HOME: /home/openhuman/.openhuman/cache
TMPDIR: /tmp
RUST_LOG: ${RUST_LOG:-info}
volumes:
- openhuman-workspace:/home/openhuman/.openhuman
mem_limit: ${OPENHUMAN_CORE_MEM_LIMIT:-4g}
cpus: ${OPENHUMAN_CORE_CPUS:-2.0}
healthcheck:
test: ["CMD", "curl", "-fsS", "http://localhost:7788/health"]
interval: 30s
timeout: 5s
start_period: 15s
retries: 3
volumes:
openhuman-workspace:
name: openhuman-workspace