-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
120 lines (114 loc) · 3.56 KB
/
docker-compose.yml
File metadata and controls
120 lines (114 loc) · 3.56 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
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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
services:
# Lotus RPC proxy: the only container with host networking.
# Forwards to Lotus gateway/RPC processes on the host. Other containers
# reach it via the Docker bridge gateway (host.docker.internal:11234/11235).
# Not needed when using remote RPC endpoints, just start the other services.
lotus-proxy:
image: alpine/socat:latest
network_mode: host
entrypoint:
- /bin/sh
- -c
- |
socat TCP-LISTEN:11234,fork,reuseaddr TCP:${LOTUS_MAINNET_HOST:-127.0.0.1}:${LOTUS_MAINNET_PORT:-2234} &
socat TCP-LISTEN:11235,fork,reuseaddr TCP:${LOTUS_CALIBNET_HOST:-127.0.0.1}:${LOTUS_CALIBNET_PORT:-2235}
restart: unless-stopped
postgres-calibnet:
image: postgres:18
environment:
POSTGRES_DB: ponder
POSTGRES_USER: ponder
POSTGRES_PASSWORD: ponder
volumes:
- pgdata-calibnet:/var/lib/postgresql
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ponder"]
interval: 2s
timeout: 5s
retries: 10
postgres-mainnet:
image: postgres:18
environment:
POSTGRES_DB: ponder
POSTGRES_USER: ponder
POSTGRES_PASSWORD: ponder
volumes:
- pgdata-mainnet:/var/lib/postgresql
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ponder"]
interval: 2s
timeout: 5s
retries: 10
ponder-calibnet:
build: indexer
depends_on:
postgres-calibnet:
condition: service_healthy
extra_hosts:
- "host.docker.internal:host-gateway"
environment:
DATABASE_URL: postgres://ponder:ponder@postgres-calibnet:5432/ponder
DATABASE_SCHEMA: public
RPC_URL: ${CALIBNET_RPC_URL:?}
PORT: 17827
restart: unless-stopped
volumes:
- ./indexer/ponder.config.calibnet.ts:/app/ponder.config.ts
- ./indexer/ponder.schema.ts:/app/ponder.schema.ts
- ./indexer/src:/app/src
- ./indexer/abis:/app/abis
ponder-mainnet:
build: indexer
depends_on:
postgres-mainnet:
condition: service_healthy
extra_hosts:
- "host.docker.internal:host-gateway"
environment:
DATABASE_URL: postgres://ponder:ponder@postgres-mainnet:5432/ponder
DATABASE_SCHEMA: public
RPC_URL: ${MAINNET_RPC_URL:?}
PORT: 17828
volumes:
- ./indexer/ponder.config.mainnet.ts:/app/ponder.config.ts
- ./indexer/ponder.schema.ts:/app/ponder.schema.ts
- ./indexer/src:/app/src
- ./indexer/abis:/app/abis
foc-observer:
build:
context: .
dockerfile: server/Dockerfile
depends_on:
postgres-calibnet:
condition: service_healthy
postgres-mainnet:
condition: service_healthy
extra_hosts:
- "host.docker.internal:host-gateway"
ports:
- "${FOC_SERVER_PORT:?}:${FOC_SERVER_PORT:?}"
environment:
FOC_SERVER_PORT: ${FOC_SERVER_PORT:?}
FOC_API_URL: ${FOC_API_URL:?}
FOC_CALIBNET_DATABASE_URL: postgres://ponder:ponder@postgres-calibnet:5432/ponder
FOC_CALIBNET_RPC_URL: ${CALIBNET_RPC_URL:?}
FOC_MAINNET_DATABASE_URL: postgres://ponder:ponder@postgres-mainnet:5432/ponder
FOC_MAINNET_RPC_URL: ${MAINNET_RPC_URL:?}
BETTERSTACK_CH_USER: ${BETTERSTACK_CH_USER:-}
BETTERSTACK_CH_PASSWORD: ${BETTERSTACK_CH_PASSWORD:-}
FOC_LOG_PATH: /data/logs/foc-observer.jsonl
volumes:
- ./logs:/data/logs
logging:
driver: json-file
options:
max-size: "50m"
max-file: "3"
restart: unless-stopped
volumes:
pgdata-calibnet:
name: ponder_pgdata-calibnet
external: true
pgdata-mainnet:
name: ponder_pgdata-mainnet
external: true