-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
100 lines (97 loc) · 3.3 KB
/
Copy pathdocker-compose.yml
File metadata and controls
100 lines (97 loc) · 3.3 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
# Local 3-node dec-party-manager dev stack.
#
# Builds the image from source (./Dockerfile). The build fetches private
# DLC-link dependencies (canton-lib) over SSH via `--mount=type=ssh`, so you
# need an ssh-agent running with a key that can read github.com/DLC-link/*:
# eval "$(ssh-agent -s)" && ssh-add ~/.ssh/<your-key>
#
# Uses bridge networking (the Compose default) so it runs the same on Docker
# Desktop for Mac, OrbStack, and Linux. Do NOT switch these to
# `network_mode: host`: on Docker Desktop for Mac a host-networked container
# runs inside Docker Desktop's Linux VM, so the published UI ports are dropped
# and localhost:808x serves nothing.
#
# Prerequisites:
# 1. Copy each remote/participant-N/.env.example to .env and fill it in.
# 2. Run `just port-forward` on the host so the Canton Ledger/Admin APIs are
# reachable at localhost:5001/5002 (p1), 5011/5012 (p2), 5021/5022 (p3).
# The containers reach those forwards via host.docker.internal (below).
#
# Per-service overrides vs the .env files:
# - DECPM_CANTON_*_HOST -> host.docker.internal: in bridge networking a
# container's localhost is itself, so the .env's `localhost` can't reach the
# host's port-forwards. host.docker.internal points at the host. (The port
# numbers still come from each .env.)
# - DECPM_PUBLIC_ADDRESS -> the compose service name: the address a node
# advertises so its peers can dial its Noise listener over the shared
# bridge network.
services:
participant-1:
platform: linux/amd64
build:
context: ..
dockerfile: development/Dockerfile
ssh:
- default
volumes:
- ./remote/participant-1/data:/app/data
ports:
- "8081:8081"
env_file:
- ./remote/participant-1/.env
environment:
DECPM_DIR: /app
DECPM_HOST: 0.0.0.0
DECPM_PORT: "8081"
DECPM_CANTON_ADMIN_HOST: host.docker.internal
DECPM_CANTON_LEDGER_HOST: host.docker.internal
DECPM_PUBLIC_ADDRESS: participant-1
extra_hosts:
- "host.docker.internal:host-gateway"
entrypoint: ["dec-party-manager", "serve"]
participant-2:
platform: linux/amd64
build:
context: ..
dockerfile: development/Dockerfile
ssh:
- default
volumes:
- ./remote/participant-2/data:/app/data
ports:
- "8082:8082"
env_file:
- ./remote/participant-2/.env
environment:
DECPM_DIR: /app
DECPM_HOST: 0.0.0.0
DECPM_PORT: "8082"
DECPM_CANTON_ADMIN_HOST: host.docker.internal
DECPM_CANTON_LEDGER_HOST: host.docker.internal
DECPM_PUBLIC_ADDRESS: participant-2
extra_hosts:
- "host.docker.internal:host-gateway"
entrypoint: ["dec-party-manager", "serve"]
participant-3:
platform: linux/amd64
build:
context: ..
dockerfile: development/Dockerfile
ssh:
- default
volumes:
- ./remote/participant-3/data:/app/data
ports:
- "8083:8083"
env_file:
- ./remote/participant-3/.env
environment:
DECPM_DIR: /app
DECPM_HOST: 0.0.0.0
DECPM_PORT: "8083"
DECPM_CANTON_ADMIN_HOST: host.docker.internal
DECPM_CANTON_LEDGER_HOST: host.docker.internal
DECPM_PUBLIC_ADDRESS: participant-3
extra_hosts:
- "host.docker.internal:host-gateway"
entrypoint: ["dec-party-manager", "serve"]