-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathcompose.yaml
More file actions
89 lines (86 loc) · 2.34 KB
/
compose.yaml
File metadata and controls
89 lines (86 loc) · 2.34 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
services:
kwil-postgres:
image: "ghcr.io/trufnetwork/kwil-postgres:16.8-1"
hostname: kwil-postgres
shm_size: 2G
restart: unless-stopped
ports:
- "5432:5432"
environment:
- POSTGRES_HOST_AUTH_METHOD=trust
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U postgres" ]
interval: 5s
timeout: 5s
retries: 5
deploy:
resources:
limits:
memory: 1.5G
# persis data
volumes:
- ${POSTGRES_VOLUME:-data-kwil-postgres}:/var/lib/postgresql/data
networks:
- tn-network
logging:
driver: "json-file"
options:
max-size: "100m"
max-file: "2"
tag: "{{.Name}}"
tn-db:
container_name: tn-db
hostname: tn-db
image: "ghcr.io/trufnetwork/node:${TN_IMAGE:-local}"
restart: unless-stopped
build:
context: .
dockerfile: ./deployments/Dockerfile
environment:
CONFIG_PATH: /root/.kwild
# app.pg-db-host
KWILD_DB_HOST: kwil-postgres
# Optionally supply SETUP_DB_OWNER to override the owner derived from the generated node key
SETUP_DB_OWNER: ${SETUP_DB_OWNER:-}
SETUP_CHAIN_ID: ${SETUP_CHAIN_ID:-trufnetwork-dev}
# Go memory tuning to prevent OOM kills within container memory limits.
# GOMEMLIMIT should be ~80% of the container memory limit.
GOMEMLIMIT: ${GOMEMLIMIT:-2500MiB}
# GOGC=50 triggers GC when heap grows 50% (default 100), reducing peak memory.
GOGC: ${GOGC:-50}
ports:
- "50051:50051"
- "${TN_RPC_PORT:-8484}:8484"
- "8080:8080"
- "26656:26656"
healthcheck:
test: [ "CMD-SHELL", "wget -q --spider http://localhost:8484/api/v1/health" ]
interval: 1m
timeout: 10s
retries: 10
deploy:
resources:
limits:
memory: 3G
depends_on:
kwil-postgres:
condition: service_healthy
volumes:
- ${TN_VOLUME:-data-tn-db}:/root/.kwild
networks:
- tn-network
extra_hosts:
- "host.docker.internal:host-gateway"
logging:
driver: "json-file"
options:
max-size: "100m"
max-file: "2"
tag: "{{.Name}}"
networks:
tn-network:
driver: bridge
name: tn-network
volumes:
data-kwil-postgres:
data-tn-db: