-
-
Notifications
You must be signed in to change notification settings - Fork 146
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
92 lines (82 loc) · 3.78 KB
/
Copy pathdocker-compose.yml
File metadata and controls
92 lines (82 loc) · 3.78 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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
# OpenSwarm daemon — single instance per state volume. Two containers sharing
# one openswarm-state volume would fight over the daemon's pid/lock files and
# double-process the same tracker issues.
services:
openswarm:
build:
context: .
dockerfile: Dockerfile
target: production
# Pin OPENSWARM_IMAGE to an immutable commit tag in production so the
# daemon and strict companion cannot silently start different builds.
image: ${OPENSWARM_IMAGE:-openswarm:latest}
container_name: openswarm
restart: unless-stopped
environment:
- TZ=Asia/Seoul
# The dashboard binds 127.0.0.1 (container-internal) unless a token is
# set — an unauthenticated 0.0.0.0 bind is refused by design. Without
# this, the published port below answers nothing; the daemon itself and
# the in-container healthcheck still work. Reads/mutations from outside
# then require the X-OpenSwarm-Token header (/api/health stays open).
- OPENSWARM_WEB_TOKEN=${OPENSWARM_WEB_TOKEN:-}
# Agents read the warehouse through the read-only mount. The operator
# web UI writes through a second mount of the same host directory.
- OPENSWARM_WAREHOUSE_ROOT=/warehouse
- OPENSWARM_WAREHOUSE_WRITE_ROOT=/warehouse-rw
# Provider/API keys come from .env (see env_file) or the shell:
# LINEAR_API_KEY, LINEAR_TEAM_ID, DISCORD_TOKEN, DISCORD_CHANNEL_ID,
# ATLASCLOUD_API_KEY, OPENROUTER_API_KEY, ...
# SearXNG / vega-search backend for web_search (preferred over DuckDuckGo):
- OPENSWARM_SEARXNG_URL=${OPENSWARM_SEARXNG_URL:-}
# Optional: create .env next to this file. Missing file is not an error.
env_file:
- path: .env
required: false
ports:
- "3847:3847"
volumes:
# Daemon configuration — run `cp config.example.yaml config.yaml` BEFORE
# `docker compose up`: if the file does not exist, Docker creates a
# directory at this path and the daemon fails with an unreadable-config
# error instead of a clear "file missing" one.
- ./config.yaml:/app/config.yaml:ro
# Daemon state: task state, auth profiles, coordination board, logs.
# Must persist or every restart forgets everything.
- openswarm-state:/home/openswarm/.openswarm
# Repositories the daemon works on. Point allowedProjects at /work/<repo>.
- ${OPENSWARM_WORKSPACE:-./workspace}:/work
# Local-only data and credentials live outside every Git checkout. The
# first view is agent-readable only; the second is used by the authorized
# browser upload handler. See docs/WAREHOUSE.md.
- ${OPENSWARM_WAREHOUSE_HOST:-../openswarm-warehouse}:/warehouse:ro
- ${OPENSWARM_WAREHOUSE_HOST:-../openswarm-warehouse}:/warehouse-rw
# Git identity for worker commits (or set GIT_AUTHOR_* env instead).
# - ~/.gitconfig:/home/openswarm/.gitconfig:ro
# ChatGPT-OAuth (codex-responses adapter) state from a host login:
# - ~/.codex:/home/openswarm/.codex
healthcheck:
test: ["CMD", "curl", "-fsS", "http://localhost:3847/api/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 30s
logging:
driver: json-file
options:
max-size: "10m"
max-file: "3"
# A concrete ceiling makes host provisioning observable. Override on large
# hosts (vela uses 48g) while leaving headroom for Docker and other services.
mem_limit: ${OPENSWARM_MEMORY_LIMIT:-24g}
security_opt:
- no-new-privileges:true
# The verify sandbox (bubblewrap) is fail-closed under Docker's default
# seccomp profile. To enable it, uncomment — and understand — the following:
# security_opt:
# - seccomp=unconfined
# cap_add:
# - SYS_ADMIN
volumes:
openswarm-state:
driver: local