-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
70 lines (66 loc) · 2.27 KB
/
Copy pathdocker-compose.yml
File metadata and controls
70 lines (66 loc) · 2.27 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
version: '3.8'
services:
postgres:
image: postgres:16-alpine
environment:
POSTGRES_USER: ${POSTGRES_USER:-oracle}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-oracle}
POSTGRES_DB: ${POSTGRES_DB:-oracle}
volumes:
- pgdata:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-oracle}"]
interval: 10s
timeout: 5s
retries: 5
restart: unless-stopped
api:
build:
context: .
dockerfile: api/Dockerfile
ports:
- "${PORT:-3000}:3000"
environment:
PORT: 3000
DATABASE_URL: postgresql://${POSTGRES_USER:-oracle}:${POSTGRES_PASSWORD:-oracle}@postgres:5432/${POSTGRES_DB:-oracle}
API_KEY: ${API_KEY:-}
SOROBAN_RPC_URL: ${SOROBAN_RPC_URL:-https://soroban-testnet.stellar.org}
CONTRACT_ID: ${CONTRACT_ID:-}
LOG_LEVEL: ${LOG_LEVEL:-info}
WS_BROADCAST_INTERVAL: ${WS_BROADCAST_INTERVAL:-5000}
RATE_LIMIT_WINDOW_MS: ${RATE_LIMIT_WINDOW_MS:-60000}
RATE_LIMIT_MAX: ${RATE_LIMIT_MAX:-120}
STALE_THRESHOLD_MS: ${STALE_THRESHOLD_MS:-300000}
CORS_ORIGIN: ${CORS_ORIGIN:-*}
depends_on:
postgres:
condition: service_healthy
restart: unless-stopped
healthcheck:
test: ["CMD", "wget", "-qO-", "http://localhost:3000/health"]
interval: 10s
timeout: 5s
retries: 5
start_period: 15s
aggregator:
build:
context: .
dockerfile: aggregator/Dockerfile
environment:
DATABASE_URL: postgresql://${POSTGRES_USER:-oracle}:${POSTGRES_PASSWORD:-oracle}@postgres:5432/${POSTGRES_DB:-oracle}
SOROBAN_RPC_URL: ${SOROBAN_RPC_URL:-https://soroban-testnet.stellar.org}
CONTRACT_ID: ${CONTRACT_ID:-}
AGGREGATOR_SECRET_KEY: ${AGGREGATOR_SECRET_KEY:-}
POLL_INTERVAL: ${POLL_INTERVAL:-60000}
ASSET_PAIRS: ${ASSET_PAIRS:-XLM/USD,BTC/USD,ETH/USD,USDC/USD,SOL/USD}
LOG_LEVEL: ${LOG_LEVEL:-info}
REFLECTOR_API_URL: ${REFLECTOR_API_URL:-https://data.reflector.network/api/v1}
SOURCE_MAX_RETRIES: ${SOURCE_MAX_RETRIES:-3}
SOURCE_RETRY_DELAY_MS: ${SOURCE_RETRY_DELAY_MS:-1000}
STALE_THRESHOLD_MS: ${STALE_THRESHOLD_MS:-300000}
depends_on:
postgres:
condition: service_healthy
restart: unless-stopped
volumes:
pgdata: