forked from Betta-Pay/BettaPay-Backend
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
196 lines (190 loc) · 5.83 KB
/
Copy pathdocker-compose.yml
File metadata and controls
196 lines (190 loc) · 5.83 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
services:
postgres:
image: postgres:16-alpine
container_name: bettapay-postgres
environment:
POSTGRES_DB: bettapay
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
ports:
- "5432:5432"
volumes:
- postgres-data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres -d bettapay"]
interval: 10s
timeout: 5s
retries: 10
start_period: 10s
restart: unless-stopped
redis:
image: redis:7-alpine
container_name: bettapay-redis
ports:
- "6379:6379"
volumes:
- redis-data:/data
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 10
restart: unless-stopped
api-gateway:
build:
context: .
dockerfile: Dockerfile
container_name: bettapay-api-gateway
command: sh -c "./docker-entrypoint.sh pnpm --filter api-gateway dev"
environment:
NODE_ENV: development
PORT: 3000
DATABASE_URL: postgresql://postgres:postgres@postgres:5432/bettapay?schema=public
REDIS_URL: redis://redis:6379
INTER_SERVICE_SECRET: dev-inter-service-secret
JWT_SECRET: super-secret-development-key-please-change
JWT_EXPIRES_IN: 24h
GOOGLE_CLIENT_ID: local-dev-google-client
ALLOWED_ORIGINS: http://localhost:3000,http://localhost:5173
SETTLEMENT_CONTRACT_ID: CA_TEST
GOVERNANCE_CONTRACT_ID: GA_TEST
ADMIN_ADDRESS: GA_TEST
ADMIN_SECRET: test-secret
FX_ENGINE_URL: http://fx-engine:3002
SETTLEMENT_ENGINE_URL: http://settlement-engine:3001
INDEXER_URL: http://indexer:3003
LOG_LEVEL: info
DATABASE_POOL_SIZE: 10
DATABASE_POOL_TIMEOUT: 10
REDIS_MAX_RETRIES: 3
STELLAR_RPC_URL: https://soroban-testnet.stellar.org
STELLAR_NETWORK_PASSPHRASE: Test SDF Network ; September 2015
STELLAR_HORIZON_URL: https://horizon-testnet.stellar.org
CONTRACT_IDS: ${CONTRACT_IDS:-CA_TEST}
CONTRACT_NAMES: ${CONTRACT_NAMES:-}
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
volumes:
- .:/app
- /app/node_modules
restart: unless-stopped
ports:
- "3000:3000"
fx-engine:
build:
context: .
dockerfile: Dockerfile
container_name: bettapay-fx-engine
command: sh -c "./docker-entrypoint.sh pnpm --filter fx-engine dev"
environment:
NODE_ENV: development
PORT: 3002
DATABASE_URL: postgresql://postgres:postgres@postgres:5432/bettapay?schema=public
REDIS_URL: redis://redis:6379
INTER_SERVICE_SECRET: dev-inter-service-secret
LOG_LEVEL: info
ALLOWED_ORIGINS: http://localhost:3000,http://localhost:5173
DATABASE_POOL_SIZE: 10
DATABASE_POOL_TIMEOUT: 10
REDIS_MAX_RETRIES: 3
FX_ENGINE_URL: http://fx-engine:3002
SETTLEMENT_ENGINE_URL: http://settlement-engine:3001
INDEXER_URL: http://indexer:3003
RATES_API_URL: https://api.coingecko.com/api/v3/simple/price?ids=usd-coin,tether-eurt&vs_currencies=ngn
RATES_REFRESH_INTERVAL_MS: 60000
RATES_CACHE_TTL_MS: 60000
DEFAULT_SLIPPAGE_BPS: 50
MAX_SLIPPAGE_BPS: 500
INDEXER_LAG_WARN_THRESHOLD: 10
EVENT_RETENTION_DAYS: 30
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
volumes:
- .:/app
- /app/node_modules
restart: unless-stopped
ports:
- "3002:3002"
settlement-engine:
build:
context: .
dockerfile: Dockerfile
container_name: bettapay-settlement-engine
command: sh -c "./docker-entrypoint.sh pnpm --filter settlement-engine dev"
environment:
NODE_ENV: development
PORT: 3001
DATABASE_URL: postgresql://postgres:postgres@postgres:5432/bettapay?schema=public
REDIS_URL: redis://redis:6379
INTER_SERVICE_SECRET: dev-inter-service-secret
LOG_LEVEL: info
ALLOWED_ORIGINS: http://localhost:3000,http://localhost:5173
DATABASE_POOL_SIZE: 10
DATABASE_POOL_TIMEOUT: 10
REDIS_MAX_RETRIES: 3
FX_ENGINE_URL: http://fx-engine:3002
SETTLEMENT_ENGINE_URL: http://settlement-engine:3001
INDEXER_URL: http://indexer:3003
SETTLEMENT_CONTRACT_ID: CA_TEST
GOVERNANCE_CONTRACT_ID: GA_TEST
ADMIN_ADDRESS: GA_TEST
ADMIN_SECRET: test-secret
EVENT_RETENTION_DAYS: 30
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
volumes:
- .:/app
- /app/node_modules
restart: unless-stopped
ports:
- "3001:3001"
indexer:
build:
context: .
dockerfile: Dockerfile
container_name: bettapay-indexer
command: sh -c "./docker-entrypoint.sh pnpm --filter indexer dev"
environment:
NODE_ENV: development
PORT: 3003
DATABASE_URL: postgresql://postgres:postgres@postgres:5432/bettapay?schema=public
REDIS_URL: redis://redis:6379
INTER_SERVICE_SECRET: dev-inter-service-secret
LOG_LEVEL: info
ALLOWED_ORIGINS: http://localhost:3000,http://localhost:5173
DATABASE_POOL_SIZE: 10
DATABASE_POOL_TIMEOUT: 10
REDIS_MAX_RETRIES: 3
FX_ENGINE_URL: http://fx-engine:3002
SETTLEMENT_ENGINE_URL: http://settlement-engine:3001
INDEXER_URL: http://indexer:3003
SETTLEMENT_CONTRACT_ID: CA_TEST
GOVERNANCE_CONTRACT_ID: GA_TEST
ADMIN_ADDRESS: GA_TEST
ADMIN_SECRET: test-secret
CONTRACT_IDS: ${CONTRACT_IDS:-CA_TEST}
CONTRACT_NAMES: ${CONTRACT_NAMES:-}
EVENT_RETENTION_DAYS: 30
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
volumes:
- .:/app
- /app/node_modules
restart: unless-stopped
ports:
- "3003:3003"
volumes:
postgres-data:
redis-data: