-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
112 lines (107 loc) · 4.48 KB
/
Copy pathdocker-compose.yml
File metadata and controls
112 lines (107 loc) · 4.48 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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
# Stella — Docker Compose example
#
# Named volume mode with Docker sandbox backend (DooD):
# stellad runs inside the container; sandbox containers are created via the
# host Docker socket. STELLA_HOME is backed by a named volume so the host
# daemon can mount workspace subdirectories into sandbox containers via
# volume subpath mounts (requires Docker Engine 25+).
#
# Quick start:
# 1. Set STELLA_VAULT_KEY (run `stellad vault keygen`) and your API key in the
# environment or a .env file.
# 2. Create the named volumes — they are external on purpose (see the volumes
# section), so create them once before the first `up`:
# docker volume create stella-data && docker volume create stella-otel-data && docker volume create stella-pg-data
# 3. docker compose up -d
# 4. Open http://localhost:25688 to configure agents and channels.
#
# First-run setup (before running in the background):
# Then open http://localhost:25688 to finish setup.
services:
stella-volume-init:
build: .
image: ${STELLA_IMAGE:-ghcr.io/cherryhq/stella:latest}
user: root
restart: "no"
volumes:
- stella-data:/home/stella/.stella
command: ["sh", "-c", "chown -R stella:stella /home/stella/.stella"]
postgres:
# PostgreSQL 18 with Stella's required pg_search and pgvector extensions.
image: paradedb/paradedb:0.24.0-pg18
command: ["postgres", "-c", "shared_preload_libraries=pg_search,pg_cron"]
restart: unless-stopped
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
- POSTGRES_DB=stella
# Preserve the existing Compose volume layout across the image switch.
- PGDATA=/var/lib/postgresql/data
volumes:
- stella-pg-data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres -d stella"]
interval: 5s
timeout: 5s
retries: 10
stella:
build: .
image: ${STELLA_IMAGE:-ghcr.io/cherryhq/stella:latest} # mise run dev:docker sets this to the local stella:latest
restart: unless-stopped
depends_on:
stella-volume-init:
condition: service_completed_successfully
postgres:
condition: service_healthy
group_add:
# Let the non-root stella user access the host Docker socket in DooD mode.
- ${DOCKER_SOCKET_GID:-0}
ports:
- "25688:25678"
volumes:
# Named volume backing STELLA_HOME (~/.stella for the image's stella user) — required for docker sandbox volume mode
- stella-data:/home/stella/.stella
# Host Docker socket so stellad can create sandbox containers
- /var/run/docker.sock:/var/run/docker.sock
env_file: ${STELLA_HOME:-${HOME}/.stella-dev}/.env
environment:
# - STELLA_VAULT_KEY=${STELLA_VAULT_KEY:?set STELLA_VAULT_KEY first (run stellad vault keygen)}
# Authenticates the boot-time mise reconcile of builtin tools (avoids GitHub rate limits)
- GITHUB_TOKEN=${GITHUB_TOKEN:-}
# External PostgreSQL DSN -> use the postgres service instead of the managed embedded server
- STELLA_DATABASE_URL=postgres://postgres:postgres@postgres:5432/stella?sslmode=disable
# Lock sandbox backend via env (docker | local | none); UI becomes read-only
- STELLA_SANDBOX_BACKEND=docker
# Deployment-owned mode: this Compose topology always uses the named volume below
- STELLA_DOCKER_SANDBOX_MODE=volume
# Optional registered OCI runtime for sandbox containers (for example, runsc for gVisor)
- STELLA_DOCKER_RUNTIME=${STELLA_DOCKER_RUNTIME:-}
# Tell volume mode which named volume backs STELLA_HOME
- STELLA_HOME_VOLUME=stella-data
# OTEL
- OTEL_SERVICE_NAME=stella
- OTEL_RESOURCE_ATTRIBUTES=deployment.environment=dev,service.version=dev
- OTEL_TRACES_EXPORTER=otlp
- OTEL_LOGS_EXPORTER=otlp
- OTEL_METRICS_EXPORTER=none
- OTEL_EXPORTER_OTLP_PROTOCOL=http/protobuf
- OTEL_EXPORTER_OTLP_ENDPOINT=http://otel:4318
otel:
image: grafana/otel-lgtm
container_name: otel-lgtm
ports:
- "4317:4317" # OTLP gRPC
- "4318:4318" # OTLP HTTP
- "13413:3000" # Grafana UI
volumes:
- stella-otel-data:/data
volumes:
# external on purpose: a fixed-name, pre-created volume is shared across
# projects/worktrees and survives `docker compose down -v`, so STELLA_HOME data
# is never silently recreated. Create them once (see Quick start step 2).
stella-data:
external: true
stella-otel-data:
external: true
stella-pg-data:
external: true