-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
36 lines (35 loc) · 1.48 KB
/
Copy pathdocker-compose.yml
File metadata and controls
36 lines (35 loc) · 1.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
# SQLite is file-based, so there is no database service to run — only the app.
# The sqlite file lives on a named volume so it survives container restarts.
services:
api:
build:
context: ./api
dockerfile: Dockerfile.service
container_name: hermes-api
restart: unless-stopped
env_file:
- ./api/.env
environment:
DATABASE_URL: file:/data/hermes.db
# Mount workspaces and hermes-state at the same absolute path inside and outside the
# container so that sibling agent containers (resolved by the host daemon) see the
# same paths the service writes to.
WORKSPACE_ROOT: ${PWD}/workspaces
HERMES_HOME: ${PWD}/hermes-state
# Pin sandbox mode so a prior SANDBOX_MODE=none in .env can't accidentally
# put the compose deployment into bare-metal mode.
SANDBOX_MODE: default
volumes:
- hermes-data:/data
# Same-path bind mounts: host path == container path == the env vars above.
# Agent volume mounts (-v <path>:/workspace or /root/.hermes/…) are resolved by
# the host daemon, so sources must exist on the host — these ensure they do.
- ${PWD}/workspaces:${PWD}/workspaces
- ${PWD}/hermes-state:${PWD}/hermes-state
# Docker socket: lets the service spawn sibling agent containers on the host daemon
# without running a nested Docker daemon (sibling container pattern).
- /var/run/docker.sock:/var/run/docker.sock
ports:
- "3030:3030"
volumes:
hermes-data: