-
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
57 lines (54 loc) · 1.75 KB
/
Copy pathdocker-compose.yml
File metadata and controls
57 lines (54 loc) · 1.75 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
# Usage:
# docker compose up -d postgres # DB only (for local dev with pnpm dev)
# pnpm docker:up # Full stack (postgres + api + indexer)
# NETWORK=mainnet pnpm docker:up # Full stack on mainnet
services:
postgres:
image: postgres:16
ports:
- "${DB_PORT:-5432}:5432"
environment:
POSTGRES_USER: bim_user
POSTGRES_PASSWORD: bim_password
POSTGRES_DB: bim
volumes:
- ./data/${NETWORK:-testnet}/pgdata:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U bim_user -d bim"]
interval: 5s
timeout: 3s
retries: 5
api:
build:
context: .
dockerfile: apps/api/Dockerfile
args:
APP_VERSION: ${APP_VERSION:-dev}
NODE_VERSION: ${NODE_VERSION:?NODE_VERSION is required (use scripts/docker.sh which reads .nvmrc)}
image: bim-api:${APP_VERSION:-latest}
ports:
- "8080:8080"
environment:
NETWORK: ${NETWORK:-testnet}
DATABASE_URL: postgresql://bim_user:bim_password@postgres:5432/bim
env_file:
- apps/api/.env.${NETWORK:-testnet}.secret
depends_on:
postgres:
condition: service_healthy
indexer:
build:
context: .
dockerfile: apps/indexer/Dockerfile
args:
APP_VERSION: ${APP_VERSION:-dev}
NODE_VERSION: ${NODE_VERSION:?NODE_VERSION is required (use scripts/docker.sh which reads .nvmrc)}
image: bim-indexer:${APP_VERSION:-latest}
environment:
PRESET: ${NETWORK:-testnet}
APIBARA_RUNTIME_CONFIG: '{"connectionString":"postgresql://bim_user:bim_password@postgres:5432/bim"}'
env_file:
- apps/indexer/.env.${NETWORK:-testnet}.secret
depends_on:
postgres:
condition: service_healthy