Repository navigation
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
65 lines (62 loc) · 1.55 KB
/
Copy pathdocker-compose.yml
File metadata and controls
65 lines (62 loc) · 1.55 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
services:
db:
image: postgres:15-alpine
restart: always
environment:
POSTGRES_USER: user
POSTGRES_PASSWORD: password
POSTGRES_DB: stellarstream
ports:
- "5432:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U user -d stellarstream"]
interval: 5s
timeout: 5s
retries: 5
redis:
image: redis:7-alpine
restart: always
ports:
- "6379:6379"
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 5s
timeout: 5s
retries: 5
api:
build: ./backend
restart: always
ports:
- "3000:3000"
environment:
DATABASE_URL: "postgresql://user:password@db:5432/stellarstream?schema=public"
REDIS_URL: "redis://redis:6379"
EVENT_WATCHER_PORT: 3001
depends_on:
db:
condition: service_healthy
redis:
condition: service_healthy
event-watcher:
build:
context: ./backend
dockerfile: Dockerfile.event-watcher
restart: always
ports:
- "3001:3001"
environment:
DATABASE_URL: "postgresql://user:password@db:5432/stellarstream?schema=public"
REDIS_URL: "redis://redis:6379"
EVENT_WATCHER_PORT: 3001
STELLAR_RPC_URL: ${STELLAR_RPC_URL:-https://soroban-testnet.stellar.org}
V3_CONTRACT_ID: ${V3_CONTRACT_ID:-}
depends_on:
db:
condition: service_healthy
redis:
condition: service_healthy
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:3001/health"]
interval: 10s
timeout: 5s
retries: 3