-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
117 lines (109 loc) · 3.81 KB
/
Copy pathdocker-compose.yml
File metadata and controls
117 lines (109 loc) · 3.81 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
version: '3.8'
# Local development environment for Invoice Liquidity Network.
#
# This file manages three services that together form the local dev stack:
#
# stellar-node — standalone Stellar Quickstart node with Soroban RPC
# contract-deployer — builds context: ./contract-deployer; deploys the
# Soroban contract once the node is healthy and writes
# the contract ID to .docker-output/contract-id.txt
# account-seeder — builds context: ./account-seeder; creates funded test
# accounts and mock assets after the deployer completes
#
# For CI and E2E tests, `docker compose up --build` starts all three in the
# correct dependency order via health checks.
#
# The scripts/ directory contains additional helper scripts that are invoked
# directly (not through Docker) during local Make-based development:
#
# scripts/dev-setup.sh — installs Rust, WASM target, and Stellar CLI
# scripts/deploy.ts — deploys the contract to testnet/mainnet
# scripts/seed.sh — seeds local network with test identities and invoices
# scripts/fund-wallets.sh — funds testnet wallets via Friendbot (testnet only)
#
# See docs/local-development.md for the full workflow.
services:
stellar-node:
image: stellar/quickstart:testing
command: --standalone --enable-soroban-rpc
ports:
- '8000:8000' # Horizon + Friendbot + Soroban RPC
- '11626:11626' # Stellar Core peer port
healthcheck:
test: ['CMD-SHELL', 'curl -s http://localhost:8000/friendbot | grep -q ''"status": 400''']
interval: 5s
timeout: 5s
retries: 15
volumes:
- stellar-data:/opt/stellar
redis:
image: redis:7-alpine
ports:
- '6379:6379'
indexer:
image: node:20-alpine
working_dir: /workspace
command: sh -lc "corepack enable && pnpm install --frozen-lockfile && pnpm dev -w iln-indexer"
depends_on:
stellar-node:
condition: service_healthy
volumes:
- .:/workspace
environment:
PORT: 3001
DB_PATH: /workspace/indexer.db
RPC_URL: http://stellar-node:8000/soroban/rpc
REDIS_URL: redis://redis:6379
ports:
- '3001:3001'
contract-deployer:
# Dockerised deployer — builds and deploys the Soroban contract to the
# local node. Used by CI and `docker compose up`. For local Make-based
# development, `make deploy-local` performs the equivalent steps directly.
build:
context: ./contract-deployer
depends_on:
stellar-node:
condition: service_healthy
volumes:
- .:/workspace
working_dir: /workspace
oracle-service:
image: node:20-alpine
working_dir: /workspace
command: sh -lc "corepack enable && pnpm install --frozen-lockfile && pnpm oracle:dev"
depends_on:
stellar-node:
condition: service_healthy
indexer:
condition: service_started
redis:
condition: service_started
volumes:
- .:/workspace
environment:
ORACLE_PORT: 3010
INDEXER_BASE_URL: http://indexer:3001
REDIS_URL: redis://redis:6379
ORACLE_CACHE_TTL_SECONDS: 300
ORACLE_REQUEST_TIMEOUT_MS: 3500
ORACLE_MAX_ORACLE_AGE_MS: 300000
ports:
- '3010:3010'
account-seeder:
# Dockerised account seeder — creates funded test accounts, mock USDC/EURC
# assets, and output files in .docker-output/. For local Make-based
# development, `make seed` (which runs scripts/seed.sh) performs the
# equivalent steps directly against the node started by `make deploy-local`.
build:
context: ./account-seeder
depends_on:
contract-deployer:
condition: service_completed_successfully
stellar-node:
condition: service_healthy
volumes:
- .:/workspace
working_dir: /workspace
volumes:
stellar-data: