-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
64 lines (62 loc) · 2.69 KB
/
Copy pathdocker-compose.yml
File metadata and controls
64 lines (62 loc) · 2.69 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
name: neuravian
services:
backend:
build:
context: ./backend
args:
GIT_COMMIT: ${GIT_COMMIT:-unknown}
ports:
- "8000:8000"
volumes:
# Persist the SQLite DB, run logs, and derivatives across restarts
- ./data:/app/data
# Pipeline manifests live at the repo root, not inside backend/
- ./pipelines:/pipelines:ro
# Core example plugins (image-statistics, etc.) live at the repo root
# plugins/ directory and are mounted at /plugins so the backend can
# discover them. The Dockerfile only copies backend/ so they cannot be
# baked into the image; a volume mount is required.
- ./plugins:/plugins:ro
# User-supplied third-party plugins live separately from bundled plugins,
# preventing the same plugin from being discovered twice.
- ./plugins-user:/plugins-user:ro
# Mount the host datasets directory read-only at /host-data.
# Set HOST_DATASETS_DIR in .env (see .env.example).
- ${HOST_DATASETS_DIR:-~/Documents}:/host-data:ro
# Docker socket — lets the backend spawn sibling containers (Docker outside
# of Docker). The backend never runs code on the host; it only builds and
# submits docker run commands on behalf of the user.
- /var/run/docker.sock:/var/run/docker.sock
environment:
# DATABASE_URL is resolved at startup by startup.py / db_selector.py.
# Do not hardcode a filename here; the selector picks the right database
# automatically based on what exists in the data directory.
DATABASE_URL: sqlite:////app/data/neuravian.db
DATA_DIR: /app/data
# Tell the backend what host prefix maps to /host-data so it can
# transparently translate paths the user pastes from their Mac.
HOST_DATASETS_MOUNT: ${HOST_DATASETS_DIR:-~/Documents}
BACKEND_DATASETS_MOUNT: /host-data
# Real host user identity, resolved by Docker Compose from the calling shell
# at compose-up time. The backend container runs as root (no USER in
# Dockerfile), so os.getuid() always returns 0. Pipelines that set
# run_as_host_user: true (e.g. FastSurfer) read these instead to pass
# -u uid:gid to the spawned container, matching the host Mac user.
HOST_UID: ${HOST_UID:-0}
HOST_GID: ${HOST_GID:-0}
healthcheck:
test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:8000/api/health')"]
interval: 10s
timeout: 5s
retries: 5
frontend:
build:
context: .
dockerfile: frontend/Dockerfile
args:
GIT_COMMIT: ${GIT_COMMIT:-unknown}
ports:
- "3000:3000"
depends_on:
backend:
condition: service_healthy