Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deploy: update docker-compose setup #3184

Merged
merged 1 commit into from
Oct 13, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 36 additions & 15 deletions deployments/compose/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,49 +1,70 @@
---
# docker-compose file for running a Penumbra node.
# Requires testnet config generation on the host machine.
# Stores the node config in a docker "volume", which should be
# reset between testnets: `docker volume rm compose_penumbra-pd-node0` or similar.
# See docs for details: https://guide.penumbra.zone/main/pd/join-testnet.html

# N.B. the "latest" tag for Penumbra container images maps to the latest
# tagged release; use "main" tag for tracking the rolling preview networks.
version: "3.7"
services:

# The Penumbra daemon
pd-node0:
# Initialize node config, via `pd testnet join`.
pd-node0-init:
image: ghcr.io/penumbra-zone/penumbra:latest
environment:
- RUST_LOG=info,pd=debug,penumbra=debug,jmt=debug
command: >-
sh -c
"
pd --version &&
if ! test -e /pd/testnet_data/node0/cometbft/config/config.toml ; then
>&2 printf 'ERROR: testnet config not found. Run `pd testnet join` on the host machine.'
>&2 printf 'WARN: testnet config not found. Creating fresh node identity.'
>&2 echo ' See docs for details: https://guide.penumbra.zone/main/pd/join-testnet.html'
exit 1
/bin/pd testnet --testnet-dir /pd/testnet_data join
else
>&2 echo 'Node config already found, using it'
fi &&
/bin/pd start --home /pd/testnet_data/node0/pd --grpc-bind 0.0.0.0:8080 --abci-bind 0.0.0.0:26658
chown 100 -R /pd/testnet_data/node0/cometbft &&
chown 1000 -R /pd/testnet_data/node0/pd &&
ls -l /pd/testnet_data/node0/ && exit 0
"
restart: on-failure
volumes:
- ~/.penumbra:/pd
- penumbra-pd-node0:/pd
# run initcontainer as root so we can chown dirs for app containers.
user: "0"

# The Penumbra daemon
pd-node0:
image: ghcr.io/penumbra-zone/penumbra:latest
# consider verbose debugging logs:
# environment:
# RUST_LOG: h2=off,debug
command: >-
/bin/pd start --home /pd/testnet_data/node0/pd
--grpc-bind 0.0.0.0:8080 --abci-bind 0.0.0.0:26658
restart: on-failure
volumes:
- penumbra-pd-node0:/pd
user: "${UID:-1000}"
depends_on:
- pd-node0-init
ports:
- "26658:26658"
- "8080:8080"

# The CometBFT node
cometbft-node0:
image: "docker.io/cometbft/cometbft:v0.37.2"
user: "${UID:-1000}"
ports:
- "26656:26656"
- "26657:26657"
volumes:
- ~/.penumbra/testnet_data/node0/cometbft:/cometbft
entrypoint: cometbft
command: start --proxy_app=tcp://pd-node0:26658
- penumbra-pd-node0:/cometbft
environment:
- ID=0
- LOG=${LOG:-cometbft.log}
CMTHOME: /cometbft/testnet_data/node0/cometbft
command: start --proxy_app=tcp://pd-node0:26658
depends_on:
- pd-node0

volumes:
penumbra-pd-node0: {}
Loading