-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.node-b.yml
More file actions
149 lines (142 loc) · 4.03 KB
/
docker-compose.node-b.yml
File metadata and controls
149 lines (142 loc) · 4.03 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
# Node B — isolated peer cluster for two-node local testing.
#
# Start with: docker compose -f docker-compose.node-b.yml up --build
# Stop with: docker compose -f docker-compose.node-b.yml down
# Full reset: docker compose -f docker-compose.node-b.yml down -v
#
# Only network-manager-b (host port 50163) and frontend-b (host port 3001) are
# exposed to the host. All other services are internal to this cluster.
#
# Cross-node peer addresses:
# To reach Node A from Node B admin UI: host.docker.internal:50153
# To reach Node B from Node A admin UI: host.docker.internal:50163
networks:
node-b:
driver: bridge
services:
postgres-b:
image: postgres:16-alpine
networks: [node-b]
environment:
POSTGRES_DB: tils
POSTGRES_USER: tils
POSTGRES_PASSWORD: tils
volumes:
- pgdata-b:/var/lib/postgresql/data
- ./schema:/docker-entrypoint-initdb.d
healthcheck:
test: ["CMD-SHELL", "pg_isready -U tils -d tils"]
interval: 5s
timeout: 5s
retries: 5
curios-b:
build:
context: .
dockerfile: curios-manager/Dockerfile
networks: [node-b]
ports:
- "50161:50151"
healthcheck:
test: ["CMD", "/grpc-health-probe", "-addr=:50151"]
interval: 10s
timeout: 5s
retries: 3
start_period: 10s
environment:
DATABASE_URL: postgres://tils:tils@postgres-b:5432/tils
GRPC_PORT: "50151"
NODE_KEY_PATH: /data/node.key
NODE_PUBKEY_PATH: /data/node.pub
NETWORK_GRPC: network-manager-b:50154
REGISTER_ADDRESS: curios-b:50151
LCP_SERVER_URL: ""
LSD_SERVER_URL: ""
LSD_PUBLIC_URL: ""
LCP_PROVIDER_URL: ""
volumes:
- node_identity-b:/data
depends_on:
postgres-b:
condition: service_healthy
users-manager-b:
build:
context: .
dockerfile: users-manager/Dockerfile
networks: [node-b]
healthcheck:
test: ["CMD", "/grpc-health-probe", "-addr=:50152"]
interval: 10s
timeout: 5s
retries: 3
start_period: 10s
environment:
DATABASE_URL: postgres://tils:tils@postgres-b:5432/tils
GRPC_PORT: "50152"
NODE_KEY_PATH: /data/node.key
NODE_PUBKEY_PATH: /data/node.pub
NETWORK_GRPC: network-manager-b:50154
REGISTER_ADDRESS: users-manager-b:50152
volumes:
- node_identity-b:/data
depends_on:
postgres-b:
condition: service_healthy
network-manager-b:
build:
context: .
dockerfile: network-manager/Dockerfile
networks: [node-b]
ports:
- "50163:50153"
# Internal port 50154 is NOT exposed to the host — Docker-private only.
healthcheck:
test: ["CMD", "/grpc-health-probe", "-addr=:50154"]
interval: 10s
timeout: 5s
retries: 3
start_period: 10s
environment:
DATABASE_URL: postgres://tils:tils@postgres-b:5432/tils
GRPC_PORT: "50153"
INTERNAL_GRPC_PORT: "50154"
NODE_KEY_PATH: /data/node.key
NODE_PUBKEY_PATH: /data/node.pub
NODE_CERT_PATH: /data/node.crt
volumes:
- node_identity-b:/data
extra_hosts:
- "host.docker.internal:host-gateway"
depends_on:
postgres-b:
condition: service_healthy
frontend-b:
build:
context: .
dockerfile: frontend/Dockerfile
networks: [node-b]
ports:
- "3001:3000"
healthcheck:
test: ["CMD", "wget", "-qO", "/dev/null", "http://localhost:3000/health"]
interval: 10s
timeout: 5s
retries: 3
start_period: 15s
environment:
ORIGIN: ${ORIGIN_B:-http://localhost:3001}
NETWORK_GRPC: network-manager-b:50154
GOOGLE_CLIENT_ID: ${GOOGLE_CLIENT_ID:-}
GOOGLE_CLIENT_SECRET: ${GOOGLE_CLIENT_SECRET:-}
GOOGLE_REDIRECT_URI: ${GOOGLE_REDIRECT_URI_B:-http://localhost:3001/auth/callback/google}
LCP_SERVER_URL: ""
LSD_SERVER_URL: ""
LSD_PUBLIC_URL: ""
volumes:
- node_identity-b:/data
depends_on:
network-manager-b:
condition: service_healthy
volumes:
pgdata-b:
node_identity-b:
lcp_content-b: