-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
225 lines (216 loc) · 5.8 KB
/
docker-compose.yml
File metadata and controls
225 lines (216 loc) · 5.8 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
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
services:
# PostgreSQL database for Canton
postgres:
image: postgres:17.6
container_name: retvn-postgres
environment:
POSTGRES_DB: canton
POSTGRES_USER: canton
POSTGRES_PASSWORD: canton_password
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
- ./docker/postgres/init.sql:/docker-entrypoint-initdb.d/init.sql
healthcheck:
test: ["CMD-SHELL", "pg_isready -U canton"]
interval: 10s
timeout: 5s
retries: 5
networks:
- retvn-network
# Canton sequencer (sequencer)
canton-sequencer:
build:
context: ./docker/canton
dockerfile: Dockerfile.sequencer
container_name: retvn-canton-sequencer
ports:
- 10038:10038 # Public API
- 10039:10039 # Admin API
- 10033:10033 # grpc-health-server
- 10034:10034 # http-health-server
environment:
CANTON_DB_HOST: postgres
CANTON_DB_PORT: 5432
CANTON_DB_NAME: canton-sequencer
CANTON_DB_USER: canton
CANTON_DB_PASSWORD: canton_password
volumes:
- ./docker/canton/config:/canton/config
- ./docker/canton/init:/canton/init
- canton_domain_data:/canton/data
depends_on:
postgres:
condition: service_healthy
# healthcheck:
# test: ["CMD", "curl", "-f", "http://localhost:10039/health"]
# interval: 30s
# timeout: 10s
# retries: 5
# start_period: 60s
networks:
- retvn-network
# Canton mediator (mediator)
canton-mediator:
build:
context: ./docker/canton
dockerfile: Dockerfile.mediator
container_name: retvn-canton-mediator
ports:
- 10042:10042 # Admin API
- 10043:10043 #
- 10044:10044 #
environment:
CANTON_DB_HOST: postgres
CANTON_DB_PORT: 5432
CANTON_DB_NAME: canton-mediator
CANTON_DB_USER: canton
CANTON_DB_PASSWORD: canton_password
volumes:
- ./docker/canton/config:/canton/config
- ./docker/canton/init:/canton/init
- canton_domain_data:/canton/data
depends_on:
postgres:
condition: service_healthy
# healthcheck:
# test: ["CMD", "curl", "-f", "http://localhost:10042/health"]
# interval: 30s
# timeout: 10s
# retries: 5
# start_period: 60s
networks:
- retvn-network
# Canton domain (sequencer + mediator)
canton-domain:
build:
context: ./docker/canton
dockerfile: Dockerfile.domain
container_name: retvn-canton-domain
ports:
- 10038:10038 # Public API
- 10039:10039 # Admin API
- 10033:10033 # grpc-health-server
- 10034:10034 # http-health-server
- 10042:10042 # Admin API
- 10043:10043 # grpc-health-server
- 10044:10044 # http-health-server
environment:
CANTON_DB_HOST: postgres
CANTON_DB_PORT: 5432
CANTON_DB_NAME: canton-domain
CANTON_DB_USER: canton
CANTON_DB_PASSWORD: canton_password
volumes:
- ./docker/canton/config:/canton/config
- ./docker/canton/init:/canton/init
- canton_domain_data:/canton/data
depends_on:
postgres:
condition: service_healthy
# healthcheck:
# test: ["CMD", "curl", "-f", "http://localhost:10039/health"]
# interval: 30s
# timeout: 10s
# retries: 5
# start_period: 60s
networks:
- retvn-network
# Canton participant node
canton-unlockit-participant:
build:
context: ./docker/canton
dockerfile: Dockerfile.participant
container_name: retvn-canton-unlockit-participant
ports:
- 10001:10001 # Ledger API
- 10002:10002 # Participant Admin API
- 10003:10003 # grpc-health-server
- 10004:10004 # http-health-server
- 10005:10005 # HTTP Ledger API
environment:
CANTON_DB_HOST: postgres
CANTON_DB_PORT: 5432
CANTON_DB_NAME: canton-unlockit-participant
CANTON_DB_USER: canton
CANTON_DB_PASSWORD: canton_password
volumes:
- ./docker/canton/config:/canton/config
- ./docker/canton/init:/canton/init
- ./.daml/dist:/canton/dars
- canton_unlockit_participant_data:/canton/data
depends_on:
canton-sequencer:
condition: service_healthy
canton-mediator:
condition: service_healthy
# healthcheck:
# test: ["CMD", "curl", "-f", "http://localhost:10002/health"]
# interval: 30s
# timeout: 10s
# retries: 5
# start_period: 60s
networks:
- retvn-network
# JSON API (HTTP/WebSocket API for Daml)
json-api:
build:
context: ./docker/json-api
dockerfile: Dockerfile
container_name: retvn-json-api
ports:
- "7575:7575"
environment:
LEDGER_HOST: canton-participant
LEDGER_PORT: 5021
HTTP_PORT: 7575
depends_on:
canton-unlockit-participant:
condition: service_healthy
networks:
- retvn-network
# React frontend
frontend:
build:
context: ./fe
dockerfile: Dockerfile
args:
VITE_CANTON_API_URL: http://localhost:7575
container_name: retvn-frontend
ports:
- "3000:80"
environment:
- VITE_CANTON_API_URL=http://localhost:7575
- VITE_CANTON_WS_URL=ws://localhost:7575
depends_on:
- json-api
networks:
- retvn-network
# Nginx reverse proxy (optional, for production)
nginx:
image: nginx:alpine
container_name: retvn-nginx
ports:
- "80:80"
- "443:443"
volumes:
- ./docker/nginx/nginx.conf:/etc/nginx/nginx.conf:ro
- ./docker/nginx/ssl:/etc/nginx/ssl:ro
depends_on:
- frontend
- json-api
networks:
- retvn-network
profiles:
- production
volumes:
postgres_data:
driver: local
canton_domain_data:
driver: local
canton_unlockit_participant_data:
driver: local
networks:
retvn-network:
driver: bridge