-
Notifications
You must be signed in to change notification settings - Fork 145
/
Copy pathdocker-compose.tmpl.yml
216 lines (200 loc) · 8.63 KB
/
docker-compose.tmpl.yml
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
#@ load("@ytt:data", "data")
#@ galoy_api_image_digest = "sha256@3ddf3176d5bfd52c29b1c04167746a92ba362968407fe804e3ee04eb206fad83"
#@ galoy_trigger_image_digest = "sha256@579619c2d842227233cb6fd6eca82fc51ee5acc4589253f30268f3a418cdf51e"
#@ mongodb_migrate_image_digest = "sha256@256a134a764d97d7e57417f2a9f7b6625c46dd19a2e809f60d9475ecaca7fe44"
#@ galoy_notifications_image_digest = "sha256@71c53ab3d9a4282d44d0605b95f1691ebc23334e8108bd4d06021a0c627a1205"
#@ core_env = [
#@ "HELMREVISION=dev",
#@ "NETWORK=regtest",
#@ "OATHKEEPER_DECISION_ENDPOINT=http://oathkeeper:4456",
#@ "TWILIO_ACCOUNT_SID=AC_twilio_id",
#@ "TWILIO_AUTH_TOKEN=AC_twilio_auth_token",
#@ "TWILIO_VERIFY_SERVICE_ID=VA_twilio_service",
#@ "KRATOS_PG_CON=postgres://dbuser:secret@kratos-pg:5432/default?sslmode=disable",
#@ "KRATOS_PUBLIC_API=http://kratos:4433",
#@ "KRATOS_ADMIN_API=http://kratos:4434",
#@ "KRATOS_MASTER_USER_PASSWORD=passwordHardtoFindWithNumber123",
#@ "KRATOS_CALLBACK_API_KEY=The-Value-of-My-Key",
#@ "PRICE_HOST=price",
#@ "PRICE_HISTORY_HOST=price-history",
#@ "PRICE_SERVER_HOST=stablesats",
#@ "BRIA_HOST=bria",
#@ "BRIA_API_KEY=bria_dev_000000000000000000000",
#@ "NOTIFICATIONS_HOST=notifications",
#@ "MONGODB_CON=mongodb://mongodb:27017/galoy",
#@ "REDIS_MASTER_NAME=mymaster",
#@ "REDIS_PASSWORD=",
#@ "REDIS_0_DNS=redis",
#@ "REDIS_0_PORT=6379",
#@ "REDIS_TYPE=standalone",
#@ "UNSECURE_IP_FROM_REQUEST_OBJECT=true",
#@ "UNSECURE_DEFAULT_LOGIN_CODE=000000",
#@ "GEETEST_ID=geetest_id",
#@ "GEETEST_KEY=geetest_key",
#@ "LND1_TLS=LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUNZVENDQWdlZ0F3SUJBZ0lSQU9zZzdYWFR4cnVZYlhkeTY2d3RuN1F3Q2dZSUtvWkl6ajBFQXdJd09ERWYKTUIwR0ExVUVDaE1XYkc1a0lHRjFkRzluWlc1bGNtRjBaV1FnWTJWeWRERVZNQk1HQTFVRUF4TU1PRFl4T1RneApNak5tT0Roak1CNFhEVEl6TURFeE9USXdOREUxTTFvWERUTTBNRGN5TVRJd05ERTFNMW93T0RFZk1CMEdBMVVFCkNoTVdiRzVrSUdGMWRHOW5aVzVsY21GMFpXUWdZMlZ5ZERFVk1CTUdBMVVFQXhNTU9EWXhPVGd4TWpObU9EaGoKTUZrd0V3WUhLb1pJemowQ0FRWUlLb1pJemowREFRY0RRZ0FFM1lieUlKWU1Vcm8zZkl0UFFucysxZ2lpTXI5NQpJUXRmclFDQ2JhOWVtcjI4TENmbk1vYy9VQVFwUlg3QVlvVFRneUdiMFBuZGNU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z3uUfzCpeBhfapGf9s/AZPOVwf6s=",
#@ "LND1_PUBKEY=03ca1907342d5d37744cb7038375e1867c24a87564c293157c95b2a9d38dcfb4c2",
#@ "LND1_DNS=lnd1",
#@ "LND1_RPCPORT=10009",
#@ "LND1_NAME=lnd1",
#@ "LND1_TYPE=offchain,onchain",
#@ "SVIX_SECRET=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE2OTE2NzIwMTQsImV4cCI6MjAwNzAzMjAxNCwibmJmIjoxNjkxNjcyMDE0LCJpc3MiOiJzdml4LXNlcnZlciIsInN1YiI6Im9yZ18yM3JiOFlkR3FNVDBxSXpwZ0d3ZFhmSGlyTXUifQ.b9s0aWSisNdUNki4edabBEToLNSwjC9-AiJQr4J3y4E",
#@ "SVIX_ENDPOINT=http://svix:8071",
#@ "EXPORTER_PORT=3003",
#@ "OTEL_EXPORTER_OTLP_ENDPOINT=http://otel-agent:4318"]
version: #@ data.values.version
services:
quickstart-test:
image: busybox
depends_on:
- apollo-router
- oathkeeper
- kratos
- galoy
- trigger
- redis
- mongodb
- mongodb-migrate
- price
- bitcoind
- bitcoind-signer
- lnd1
- lnd-outside-1
- bria
- fulcrum
- stablesats
- svix
- hydra
restart: on-failure:10
#! Proxies
apollo-router: #@ data.values.services["apollo-router"]
oathkeeper: #@ data.values.services["oathkeeper"]
#! Authentication
kratos: #@ data.values.services["kratos"]
kratos-pg: #@ data.values.services["kratos-pg"]
hydra: #@ data.values.services["hydra"]
hydra-migrate: #@ data.values.services["hydra-migrate"]
hydra-pg: #@ data.values.services["hydra-pg"]
galoy:
#@ if galoy_api_image_digest == "local":
build:
context: ..
dockerfile: core/api/Dockerfile
#@ elif galoy_api_image_digest.startswith("sha256@"):
image: #@ "us.gcr.io/galoy-org/galoy-api@" + galoy_api_image_digest.replace("@",":")
#@ else:
image: #@ "us.gcr.io/galoy-org/galoy-api:" + galoy_api_image_digest
#@ end
environment: #@ core_env
depends_on:
- apollo-router
- oathkeeper
- kratos
- lnd1
- lnd-outside-1
- bria
- mongodb
- redis
- stablesats
- notifications
- price
- price-history
- svix
networks:
default:
aliases:
- bats-tests
trigger:
#@ if galoy_trigger_image_digest == "local":
build:
context: ..
dockerfile: core/api-trigger/Dockerfile
#@ elif galoy_trigger_image_digest.startswith("sha256@"):
image: #@ "us.gcr.io/galoy-org/galoy-api-trigger@" + galoy_trigger_image_digest.replace("@",":")
#@ else:
image: #@ "us.gcr.io/galoy-org/galoy-api-trigger:" + galoy_trigger_image_digest
#@ end
environment: #@ core_env
depends_on:
- galoy
notifications:
#@ if galoy_notifications_image_digest == "local":
build:
context: ..
dockerfile: core/notifications/Dockerfile
#@ elif galoy_notifications_image_digest.startswith("sha256@"):
image: #@ "us.gcr.io/galoy-org/galoy-notifications@" + galoy_notifications_image_digest.replace("@",":")
#@ else:
image: #@ "us.gcr.io/galoy-org/galoy-notifications:" + galoy_notifications_image_digest
#@ end
environment:
- PG_CON=postgres://user:password@notifications-pg:5432/pg
- PG_READ_CON=postgres://user:password@notifications-pg:5432/pg
- OTEL_EXPORTER_OTLP_ENDPOINT=http://otel-agent:4318
- NOTIFICATIONS_CONFIG=/config/notifications/notifications.yml
ports:
- 6685:6685
volumes:
- ${HOST_PROJECT_PATH:-.}/config/notifications/notifications.yml:/config/notifications/notifications.yml
- ${HOST_PROJECT_PATH:-.}/config/notifications/fake_service_account.json:/app/notifications/config/notifications/fake_service_account.json
depends_on:
- notifications-pg
notifications-pg: #@ data.values.services["notifications-pg"]
#! Database
redis: #@ data.values.services["redis"]
mongodb: #@ data.values.services["mongodb"]
mongodb-migrate:
#@ if mongodb_migrate_image_digest == "local":
build:
context: ..
dockerfile: core/api/Dockerfile-migrate
#@ elif mongodb_migrate_image_digest.startswith("sha256@"):
image: #@ "us.gcr.io/galoy-org/galoy-api-migrate@" + mongodb_migrate_image_digest.replace("@",":")
#@ else:
image: #@ "us.gcr.io/galoy-org/galoy-api-migrate:" + mongodb_migrate_image_digest
#@ end
depends_on:
- mongodb
environment:
- MONGODB_ADDRESS=mongodb
#! Price
price: #@ data.values.services["price"]
price-history: #@ data.values.services["price-history"]
price-history-migrate: #@ data.values.services["price-history-migrate"]
price-history-pg: #@ data.values.services["price-history-pg"]
#! Bitcoin stack
bitcoind: #@ data.values.services["bitcoind"]
bitcoind-signer: #@ data.values.services["bitcoind-signer"]
lnd1: #@ data.values.services["lnd1"]
lnd-outside-1: #@ data.values.services["lnd-outside-1"]
bria: #@ data.values.services["bria"]
bria-pg: #@ data.values.services["bria-pg"]
fulcrum: #@ data.values.services["fulcrum"]
#! Stablesats
stablesats: #@ data.values.services["stablesats"]
#! Otel
otel-agent: #@ data.values.services["otel-agent"]
#! Svix / callbacks
svix: #@ data.values.services["svix"]
svix-pg: #@ data.values.services["svix-pg"]
#@ load("@ytt:overlay", "overlay")
#@overlay/match by=overlay.all
---
services:
#@overlay/match by=overlay.all, expects="1+"
_:
#@overlay/match when=1
#@overlay/remove
extra_hosts: _
#@overlay/match when=1
volumes:
#@overlay/match by=overlay.all, expects="0+"
#@overlay/replace via=lambda left, right: str(left).replace("HOST_PROJECT_PATH:-.}", "HOST_PROJECT_PATH:-.}/${GALOY_QUICKSTART_PATH:-vendor/galoy-quickstart}/dev")
- REPLACED
#@overlay/match by=overlay.all
---
services:
svix:
#@overlay/match missing_ok=True
extra_hosts:
- "dockerhost-alias:host-gateway"