forked from penumbra-zone/cuiloa
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
96 lines (91 loc) · 3.01 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
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
---
# docker-compose file for running Cuiloa, a block explorer for Penumbra
# N.B. the version tag for Penumbra container images should be updated manually,
# to track the latest version available in the public releases:
# https://github.com/penumbra-zone/penumbra/releases
version: "3.7"
services:
pd-node0-init:
platform: "linux/amd64"
image: ghcr.io/penumbra-zone/penumbra:latest
command: >-
sh -c
"
pd --version &&
if ! test -e /pd/network_data/node0/cometbft/config/config.toml ; then
>&2 printf 'WARN: network config not found. Creating fresh node identity.'
>&2 echo ' See docs for details: https://guide.penumbra.zone/node/pd/join-network.html'
/bin/pd network --network-dir /pd/network_data join http://void.s9.gay:26657/genesis &&
sed -i -e 's#^indexer.*#indexer = \"psql\"\\npsql-conn = \"postgresql://penumbra:penumbra@localhost:5432/penumbra_cometbft?sslmode=disable\"#' /pd/network_data/node0/cometbft/config/config.toml
else
>&2 echo 'Node config already found, using it'
fi &&
chown 100 -R /pd/network_data/node0/cometbft &&
chown 1000 -R /pd/network_data/node0/pd &&
ls -l /pd/network_data/node0/ && exit 0
"
restart: on-failure
volumes:
- cuiloa-pd-node0:/pd
# run initcontainer as root so we can chown dirs for app containers.
user: "0"
# The Penumbra daemon
pd-node0:
platform: "linux/amd64"
image: ghcr.io/penumbra-zone/penumbra:latest
# consider verbose debugging logs:
# environment:
# RUST_LOG: h2=off,debug
command: >-
/bin/pd start --home /pd/network_data/node0/pd
--grpc-bind 0.0.0.0:8080 --abci-bind 0.0.0.0:26658
--cometbft-addr http://cometbft-node0:26657
restart: on-failure
volumes:
- cuiloa-pd-node0:/pd
user: "0"
depends_on:
- pd-node0-init
ports:
- "26658:26658"
- "8080:8080"
# The CometBFT node
cometbft-node0:
image: "docker.io/cometbft/cometbft:v0.37.9"
ports:
- "26656:26656"
- "26657:26657"
user: "0"
volumes:
- cuiloa-pd-node0:/cometbft
environment:
CMTHOME: /cometbft/network_data/node0/cometbft
command: start --proxy_app=tcp://pd-node0:26658
depends_on:
- pd-node0
# The Postgres database, for storing CometBFT indexing info
postgres:
image: "docker.io/library/postgres:latest"
ports:
- "5432:5432"
volumes:
- ./deploy/postgres-cometbft-schema.sql:/docker-entrypoint-initdb.d/postgres-cometbft-schema.sql:ro
environment:
POSTGRES_PASSWORD: penumbra
POSTGRES_USER: penumbra
POSTGRES_DB: penumbra
depends_on:
- pd-node0
# The Cuiloa application, providing a web-based block explorer for Penumbra.
cuiloa:
build:
context: ./
dockerfile: Containerfile
ports:
- "3000:3000"
environment:
DATABASE_URL: 'postgresql://penumbra:penumbra@postgres:5432/penumbra?sslmode=disable'
depends_on:
- postgres
volumes:
cuiloa-pd-node0: {}