-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose.yml
67 lines (62 loc) · 1.79 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
version: '3.9'
services:
postgres:
image: 'postgres:16-alpine'
restart: unless-stopped
ports:
- '5432:5432'
environment:
- POSTGRES_DB=indexer
- POSTGRES_USER=indexer
- POSTGRES_PASSWORD=password
volumes:
- postgres-data:/var/lib/postgresql/data
healthcheck:
test: ['CMD-SHELL', 'pg_isready -U $$POSTGRES_USER -d $$POSTGRES_DB']
interval: 5s # Check every 5 seconds for readiness
timeout: 5s # Allow up to 5 seconds for a response
retries: 3 # Fail after 3 unsuccessful attempts
start_period: 10s # Start checks after 10 seconds
networks:
- indexer-network
redis:
image: 'redis:7.2-alpine'
restart: unless-stopped
command: --loglevel warning --maxmemory-policy noeviction
volumes:
- redis-data:/data
ports:
- '6379:6379'
healthcheck:
test: ['CMD-SHELL', 'redis-cli ping']
interval: 5s # Check every 5 seconds
timeout: 5s # Allow up to 5 seconds for a response
retries: 3 # Fail after 3 unsuccessful attempts
start_period: 5s # Start health checks after 5 seconds
networks:
- indexer-network
# lazy-indexer:
# build: .
# restart: unless-stopped
# depends_on:
# postgres:
# condition: service_healthy
# redis:
# condition: service_healthy
# environment:
# - DATABASE_URL=postgresql://indexer:password@postgres:5432/indexer
# - REDIS_URL=redis://redis:6379
# - HUB_REST_URL=https://hub.pinata.cloud
# - HUB_RPC=hub-grpc.pinata.cloud
# - HUB_SSL=true
# - WORKER_CONCURRENCY=5
# - LOG_LEVEL=debug
# networks:
# - indexer-network
# command: >
# /bin/sh -c "yarn backfill & yarn stream"
volumes:
postgres-data:
redis-data:
networks:
indexer-network: