-
Notifications
You must be signed in to change notification settings - Fork 6
/
docker-compose.yml
executable file
·62 lines (62 loc) · 1.59 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
#!/usr/bin/env -S docker compose -f
services:
api:
network_mode: host
restart: unless-stopped
image: ghcr.io/hackbg/undexer:v4
build: { context: ., network: host }
entrypoint: /app/undexer
command: api
depends_on:
postgres:
condition: service_healthy
healthcheck:
test: ["CMD-SHELL", "wget -O- localhost:8888/v2/status"]
interval: 1s
timeout: 5s
retries: 5
# Indexer stores data from remote chain into local database.
indexer:
network_mode: host
restart: unless-stopped
image: ghcr.io/hackbg/undexer:v4
build: { context: ., network: host }
entrypoint: /app/undexer
command: index
depends_on:
postgres:
condition: service_healthy
healthcheck:
test: ["CMD-SHELL", "ps aux | grep undexer"]
interval: 1s
timeout: 5s
retries: 5
# Local database.
# Use `just psql` to get a shell.
postgres:
network_mode: host
restart: unless-stopped
image: postgres:16.2-alpine
ports: [ "5432:5432" ]
volumes: [ "database:/var/lib/postgresql/data" ]
environment:
- POSTGRES_PASSWORD=insecure
- POSTGRES_USER=postgres
- POSTGRES_DB=postgres
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres -d postgres"]
interval: 10s
timeout: 5s
retries: 5
# Optional DB admin.
#pgadmin:
#network_mode: host
#image: dpage/pgadmin4
#ports:
#- 5050:80
#environment:
#- PGADMIN_DEFAULT_PASSWORD=password
#- PGADMIN_LISTEN_ADDRESS=0.0.0.0
volumes:
database: