-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
136 lines (129 loc) · 4.31 KB
/
docker-compose.yml
File metadata and controls
136 lines (129 loc) · 4.31 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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
# Agent + Milvus standalone. llama-server is not managed here; it must be running
# separately (e.g. on the host). Set LLAMA_URL so the agent can reach it:
# LLAMA_URL=http://host.docker.internal:8080 (llama-server on host, Mac/Windows)
# LLAMA_URL=http://localhost:8080 (llama-server on same host when using host network)
#
# From repo root: docker compose up -d
# Build context is repo root (.) so COPY in Dockerfile sees go.mod and full tree.
#
# Process runs as non-root user `app`; $HOME is /home/app. Host ~/.micro-agent
# is mounted at /home/app/.micro-agent (writeable). config.json and SYSTEM.md
# are mounted read-only; ensure they exist on the host. mkdir -p ~/.micro-agent
#
# Milvus standalone (https://milvus.io/docs/install_standalone-docker.md):
# etcd + minio + standalone. All services use host networking; the agent connects
# to Milvus via MILVUS_ADDR=localhost:19530 and to llama-server via LLAMA_URL.
# Browserless (https://github.com/browserless/browserless) is an optional
# Chromium sidecar for full-page JS rendering and screenshots, exposed on
# http://localhost:3000 by default.
services:
ua:
build:
context: .
dockerfile: deploy/Dockerfile
image: micro-agent-ua:latest
environment:
- LLAMA_URL=http://localhost:8080
- WORKDIR=/home/app/.micro-agent/workdir
- MEMORY_DB=/home/app/.micro-agent/mem.db
- MILVUS_ADDR=localhost:19530
volumes:
- ${HOME}/.micro-agent:/home/app/.micro-agent
- ${HOME}/.micro-agent/config.json:/home/app/.micro-agent/config.json:ro
- ${HOME}/.micro-agent/SYSTEM.md:/home/app/.micro-agent/SYSTEM.md:ro
stdin_open: true
tty: true
depends_on:
standalone:
condition: service_healthy
network_mode: host
# --- Milvus standalone stack ---
etcd:
container_name: milvus-etcd
image: quay.io/coreos/etcd:v3.5.25
environment:
- ETCD_AUTO_COMPACTION_MODE=revision
- ETCD_AUTO_COMPACTION_RETENTION=1000
- ETCD_QUOTA_BACKEND_BYTES=4294967296
- ETCD_SNAPSHOT_COUNT=50000
volumes:
- milvus-etcd:/etcd
command: etcd -advertise-client-urls=http://localhost:2379 -listen-client-urls http://0.0.0.0:2379 --data-dir /etcd
healthcheck:
test: ["CMD", "etcdctl", "endpoint", "health"]
interval: 30s
timeout: 20s
retries: 3
network_mode: host
minio:
container_name: milvus-minio
image: minio/minio:RELEASE.2024-05-28T17-19-04Z
environment:
MINIO_ACCESS_KEY: minioadmin
MINIO_SECRET_KEY: minioadmin
ports:
- "9001:9001"
- "9000:9000"
volumes:
- milvus-minio:/minio_data
command: minio server /minio_data --console-address ":9001"
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
interval: 30s
timeout: 20s
retries: 3
network_mode: host
standalone:
container_name: milvus-standalone
image: milvusdb/milvus:v2.6.12
command: ["milvus", "run", "standalone"]
security_opt:
- seccomp:unconfined
environment:
MINIO_REGION: us-east-1
ETCD_ENDPOINTS: localhost:2379
MINIO_ADDRESS: localhost:9000
volumes:
- milvus-data:/var/lib/milvus
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9091/healthz"]
interval: 30s
start_period: 90s
timeout: 20s
retries: 3
ports:
- "19530:19530"
- "9091:9091"
depends_on:
etcd:
condition: service_healthy
minio:
condition: service_healthy
network_mode: host
# Browserless Chromium sidecar for full-page JS rendering and screenshots.
# The agent talks to it via BROWSERLESS_URL=http://localhost:3000.
browserless:
container_name: browserless-chromium
image: ghcr.io/browserless/chromium
environment:
- PORT=3000
- CONCURRENT=10
- MAX_QUEUE_LENGTH=50
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:3000"]
interval: 30s
timeout: 10s
retries: 3
network_mode: host
# Attu web UI for Milvus. Open http://localhost:8000 in your browser (Attu listens on port 3000 by default).
attu:
container_name: milvus-attu
image: zilliz/attu:v2.6
environment:
- MILVUS_URL=localhost:19530
- SERVER_PORT=8000
network_mode: host
volumes:
milvus-etcd:
milvus-minio:
milvus-data: