-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
91 lines (87 loc) · 2.83 KB
/
docker-compose.yml
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
services:
jsinfo-indexer:
build:
context: .
dockerfile: Dockerfile
container_name: jsinfo-indexer
command: >
sh -c "
echo command_indexer &&
echo scripts/startIndexerContainer.sh script will run here &&
ulimit -c unlimited &&
ls scripts/startIndexerContainer.sh || echo missing script &&
IS_INDEXER_PROCESS=true sh scripts/startIndexerContainer.sh || true &&
sleep 100000
"
environment:
- JSINFO_INDEXER_SAVE_CACHE=1
- JSINFO_INDEXER_READ_CACHE=1
- JSINFO_INDEXER_N_WORKERS=2
- JSINFO_INDEXER_BATCH_SIZE=250
- JSINFO_INDEXER_POLL_MS=5000
- JSINFO_INDEXER_REDDIS_CACHE=redis://:mypassword@jsinfo-redis:6379
- JSINFO_INDEXER_LAVA_RPC=https://testnet2-rpc.lavapro.xyz:443/
- JSINFO_INDEXER_START_BLOCK=2242940
- JSINFO_INDEXER_RUN_MIGRATIONS=false
- JSINFO_INDEXER_LAVA_REST_RPC_URL=https://lav1.rest.lava.build/
- JSINFO_POSTGRESQL_URL=postgres://jsinfo:secret@jsinfo-postgres:6452/jsinfo
- RELAYS_READ_POSTGRESQL_URL=postgres://jsinfo:secret@jsinfo-postgres:6452/relays
- JSINFO_QUERY_PORT=8081
depends_on:
- jsinfo-redis
- jsinfo-postgres
jsinfo-query:
build:
context: .
dockerfile: Dockerfile
container_name: jsinfo-query
command: >
sh -c "
echo command_query_first_client &&
echo scripts/startQueryContainer.sh script will run here &&
ulimit -c unlimited &&
ls scripts/startQueryContainer.sh || echo missing script &&
scripts/startQueryContainer.sh || true &&
sleep 100000
"
ports:
- "8081:8081"
environment:
- JSINFO_QUERY_IS_DEBUG_MODE=true
- JSINFO_QUERY_PORT=8081
- JSINFO_QUERY_HOST=0.0.0.0
- JSINFO_QUERY_FASITY_PRINT_LOGS=true
- JSINFO_QUERY_REDDIS_CACHE=redis://:mypassword@jsinfo-redis:6379
- JSINFO_POSTGRESQL_URL=postgres://jsinfo:secret@jsinfo-postgres:6452/jsinfo
- RELAYS_READ_POSTGRESQL_URL=postgres://jsinfo:secret@jsinfo-postgres:6452/relays
depends_on:
- jsinfo-redis
- jsinfo-postgres
jsinfo-redis:
image: redis/redis-stack:latest
container_name: jsinfo-redis
ports:
- "6379:6379"
- "8001:8001"
environment:
- REDIS_ARGS=--requirepass mypassword
volumes:
- jsinfo-redis-data:/data
jsinfo-postgres:
image: postgres:15
container_name: jsinfo-postgres
environment:
- POSTGRES_USER=jsinfo
- POSTGRES_PASSWORD=secret
- POSTGRES_DB=jsinfo
- POSTGRES_MAX_CONNECTIONS=10000
ports:
- "6452:6452"
volumes:
- jsinfo-postgres-data:/var/lib/postgresql/data
- ./docker-compose.init-db.sql:/docker-entrypoint-initdb.d/init-db.sql
command: >
postgres -c 'port=6452' -c 'max_connections=10000'
volumes:
jsinfo-redis-data:
jsinfo-postgres-data: