Repository navigation
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
56 lines (53 loc) · 1.55 KB
/
Copy pathdocker-compose.yml
File metadata and controls
56 lines (53 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
services:
lens:
build: .
ports:
- "3002:3002"
environment:
- DATABASE_URL=postgresql://lens:lens@postgres:5432/lens
- REDIS_URL=redis://redis:6379
- WATCHED_PAIRS=XLM:native/USDC:GBBD47IF6LWK7P7MDEVSCWR7DPUWV3NY3DTQEVFL4NAT4AQH3ZLLFLA5
# Network this stack ingests (the code defaults to testnet); stated
# here so a reader can tell which network the stack ingests at a glance.
- STELLAR_NETWORK=testnet
- REQUIRE_API_KEY=false
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
# No healthcheck here on purpose: the image's own HEALTHCHECK applies
# (Node one-liner against /live, see Dockerfile). A compose healthcheck
# would override it — the old curl one did, and curl isn't in the image.
# The 60s start period for first-run migrations now lives in that
# HEALTHCHECK instead of here.
postgres:
image: postgres:15-alpine
environment:
- POSTGRES_USER=lens
- POSTGRES_PASSWORD=lens
- POSTGRES_DB=lens
ports:
- "5432:5432"
volumes:
- pgdata:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U lens -d lens"]
interval: 5s
timeout: 5s
retries: 5
redis:
image: redis:7-alpine
ports:
- "6379:6379"
command: redis-server --appendonly yes
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 5s
timeout: 5s
retries: 5
volumes:
- redisdata:/data
volumes:
pgdata:
redisdata: