-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
131 lines (125 loc) · 4.15 KB
/
Copy pathdocker-compose.yml
File metadata and controls
131 lines (125 loc) · 4.15 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
121
122
123
124
125
126
127
128
129
130
131
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
restart: unless-stopped
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
restart: unless-stopped
ponder-calibnet:
build: indexer
depends_on:
postgres-calibnet:
condition: service_healthy
extra_hosts:
- "host.docker.internal:host-gateway"
environment:
PONDER_NETWORK: calibnet
PONDER_STRICT_ENV: "true"
DATABASE_URL: postgres://ponder:ponder@postgres-calibnet:5432/ponder
RPC_URL: ${CALIBNET_RPC_URL:?}
PORT: 17827
PONDER_EXPERIMENTAL_DB: platform
# Writes tables to the named schema; auto-creates views in public so the
# server queries unqualified table names. The active schema name is
# deployment state, not code: set CALIBNET_DATA_SCHEMA in .env and bump it
# when reindexing. See CLAUDE.md "Re-indexing".
command: ["npm", "start", "--", "--schema", "${CALIBNET_DATA_SCHEMA:-data_v1}", "--views-schema", "public"]
restart: unless-stopped
volumes:
- ./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:
PONDER_NETWORK: mainnet
PONDER_STRICT_ENV: "true"
DATABASE_URL: postgres://ponder:ponder@postgres-mainnet:5432/ponder
RPC_URL: ${MAINNET_RPC_URL:?}
PORT: 17828
PONDER_EXPERIMENTAL_DB: platform
command: ["npm", "start", "--", "--schema", "${MAINNET_DATA_SCHEMA:-data_v1}", "--views-schema", "public"]
restart: unless-stopped
volumes:
- ./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