Fixes for ping-pub stack

This commit is contained in:
Prathamesh Musale 2024-07-31 18:15:09 +05:30
parent dfedd9e9ff
commit 2fce823123
3 changed files with 15 additions and 2 deletions

View File

@ -4,5 +4,9 @@ services:
ping-pub: ping-pub:
image: cerc/ping-pub:local image: cerc/ping-pub:local
restart: always restart: always
environment:
LACONIC_LACONICD_CHAIN_ID: ${LACONIC_LACONICD_CHAIN_ID:-laconic_9000-1}
LACONIC_LACONICD_RPC_URL: ${LACONIC_LACONICD_RPC_URL:-http://localhost:26657}
LACONIC_LACONICD_API_URL: ${LACONIC_LACONICD_API_URL:-http://localhost:1317}
ports: ports:
- "5173:5173" - 5173

View File

@ -88,6 +88,10 @@ if [ "$1" == "clean" ] || [ ! -d "$HOME/.laconicd/data/blockstore.db" ]; then
sed -i 's/prometheus = false/prometheus = true/g' $HOME/.laconicd/config/config.toml sed -i 's/prometheus = false/prometheus = true/g' $HOME/.laconicd/config/config.toml
fi fi
# Run this to allow requests from any origin
sed -i 's/cors_allowed_origins.*$/cors_allowed_origins = ["*"]/' $HOME/.laconicd/config/config.toml
sed -i 's/enabled-unsafe-cors.*$/enabled-unsafe-cors = true/' $HOME/.laconicd/config/app.toml
# Allocate genesis accounts (cosmos formatted addresses) # Allocate genesis accounts (cosmos formatted addresses)
laconicd genesis add-genesis-account $KEY 100000000000000000000000000photon --keyring-backend $KEYRING laconicd genesis add-genesis-account $KEY 100000000000000000000000000photon --keyring-backend $KEYRING

View File

@ -26,6 +26,11 @@ fi
# subvert this lunacy. # subvert this lunacy.
explorer_mainnet_config_dir=/app/chains/mainnet explorer_mainnet_config_dir=/app/chains/mainnet
explorer_testnet_config_dir=/app/chains/testnet explorer_testnet_config_dir=/app/chains/testnet
# Create required directories
mkdir -p $explorer_mainnet_config_dir
mkdir -p $explorer_testnet_config_dir
config_template_file=/config/chains/laconic-chaindata-template.json config_template_file=/config/chains/laconic-chaindata-template.json
chain_config_name=laconic.json chain_config_name=laconic.json
mainnet_config_file=${explorer_mainnet_config_dir}/${chain_config_name} mainnet_config_file=${explorer_mainnet_config_dir}/${chain_config_name}