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
# Compose template extracted by `node-app-build dev --daemon docker`
# (plan 457 phase C+). Bundled into the binary at compile time via
# include_str! and written to $XDG_CACHE_HOME/node-app-build/compose/.
#
# Single service. Lightning sync runs in the background via the ldk-node
# builtin app; it will not sync without an esplora server (expected in
# a no-external-deps dev environment). App sideloading, IPC, and capability
# routing all work independently of Lightning sync.
#
# The host volume mounts NODE_DEV_APPS_DIR so the daemon's inotify
# watcher inside the container picks up artifacts that the CLI writes
# from the host. macOS volume sync has ~1s latency through the Docker
# VM — acceptable given the watcher's 500ms quiet window.
services:
node-server:
image: ghcr.io/econ-v1/node-server:dev
container_name: node-app-build-dev-daemon
restart: unless-stopped
environment:
# Required by Config::load
LDK_NETWORK: regtest
LDK_STORAGE_DIR_PATH: /var/lib/econ-v1/ldk_node_data
LDK_LISTENING_ADDRESS: "0.0.0.0:9735"
SIGNER_SEED_PATH: /var/lib/econ-v1/ldk_signer_seed.hex
SERVER_ADDRESS: "0.0.0.0:3001"
RUST_LOG: "info,node_server=debug,node_server::apps=debug"
# IPC socket path — must match /run/node volume mount below
NODE_IPC_SOCKET: /run/node/control.sock
# Dev-apps directory — must match /dev-apps volume mount below
NODE_DEV_APPS_DIR: /dev-apps
# Disable features not needed for the inner dev loop
DEVELOPMENT_MODE: "true"
ACME_ENABLED: "false"
RATHOLE_ENABLED: "false"
STATIC_DIR_PATH: ""
DATABASE_URL: sqlite:///var/lib/econ-v1/dev.db
# Disable inotify if you hit cross-platform issues — the IPC
# dev_load path still works.
NODE_INOTIFY_DISABLE: "0"
ports:
# HTTP API exposed on host for frontend dev server (yarn dev) and
# for `node-app-build dev` smoke checks via curl.
- "3001:3001"
volumes:
# Dev-apps mount: the CLI writes here from the host; the daemon
# reads from here inside the container.
- "${NODE_DEV_APPS_DIR:-./dev-apps}:/dev-apps:cached"
# IPC socket dir: the CLI talks to the daemon over this Unix socket.
# HOST path controlled by NODE_APP_BUILD_SOCK_DIR (set by the CLI).
- "${NODE_APP_BUILD_SOCK_DIR:-./socket}:/run/node:cached"
# Persist daemon SQLite + LDK data across container restarts.
- "${NODE_APP_BUILD_DATA:-./data}:/var/lib/econ-v1"
healthcheck:
test:
interval: 5s
timeout: 2s
retries: 24 # ~2min total
start_period: 10s