forked from Clover-Realm/Clovers
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
88 lines (83 loc) · 2.6 KB
/
Copy pathdocker-compose.yml
File metadata and controls
88 lines (83 loc) · 2.6 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
version: '3.9'
services:
# -------------------------------------------------------------------
# Relayer API — TypeScript with ts-node-dev hot reload
# -------------------------------------------------------------------
api:
build:
context: .
dockerfile: Dockerfile.dev
ports:
- '3000:3000'
volumes:
- .:/app
- /app/node_modules
- /app/sdk/node_modules
environment:
NODE_ENV: development
DATABASE_URL: postgres://bridge:bridge@postgres:5432/bridge
REDIS_URL: redis://redis:6379
STELLAR_RPC_URL: http://soroban:8000/soroban/rpc
NETWORK_PASSPHRASE: Standalone Network ; February 2017
env_file:
- .env
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
soroban:
condition: service_healthy
command: npx ts-node-dev --respawn --transpile-only relayer/index.ts
# -------------------------------------------------------------------
# PostgreSQL — event store and reconciliation DB
# -------------------------------------------------------------------
postgres:
image: postgres:16-alpine
ports:
- '5432:5432'
environment:
POSTGRES_USER: bridge
POSTGRES_PASSWORD: bridge
POSTGRES_DB: bridge
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ['CMD-SHELL', 'pg_isready -U bridge']
interval: 5s
timeout: 5s
retries: 5
# -------------------------------------------------------------------
# Redis — nonce deduplication cache and job queue
# -------------------------------------------------------------------
redis:
image: redis:7-alpine
ports:
- '6379:6379'
volumes:
- redis_data:/data
healthcheck:
test: ['CMD', 'redis-cli', 'ping']
interval: 5s
timeout: 5s
retries: 5
# -------------------------------------------------------------------
# Soroban Quickstart — local Stellar + Soroban sandbox
# -------------------------------------------------------------------
soroban:
image: stellar/quickstart:latest
ports:
- '8000:8000' # Horizon + Soroban RPC
environment:
STELLAR_NETWORK: local
ENABLE_SOROBAN_RPC: 'true'
command: --local --enable-soroban-rpc
healthcheck:
test: ['CMD-SHELL', 'curl -sf http://localhost:8000/soroban/rpc -d "{\"jsonrpc\":\"2.0\",\"id\":1,\"method\":\"getHealth\"}" -H "Content-Type: application/json" | grep -q healthy']
interval: 10s
timeout: 10s
retries: 10
start_period: 30s
volumes:
postgres_data:
redis_data: