Update dgraph URL env value in demo steps (#9)

Part of https://www.notion.so/Create-stacks-for-mainnet-1f2a6b22d4728034be4be2c51decf94e

Co-authored-by: IshaVenikar <ishavenikar7@gmail.com>
Reviewed-on: #9
Co-authored-by: ishavenikar <ishavenikar@noreply.git.vdb.to>
Co-committed-by: ishavenikar <ishavenikar@noreply.git.vdb.to>
This commit is contained in:
ishavenikar 2025-06-02 11:36:23 +00:00 committed by nabarun
parent 8a7d184610
commit b87609436a
3 changed files with 15 additions and 17 deletions

View File

@ -393,6 +393,12 @@
next_public_node_addresses: '["http://localhost:26657"]'
node_rest_endpoint: 'http://localhost:1317'
next_public_is_http_enabled: true
# Set network mode to host so that browser app and backend can use the same node localhost RPC URL
use_host_network: "host"
# Set local host URL for dgraph server
dgraph_domain: "http://localhost:8080"
```
- Set envs:
@ -400,14 +406,6 @@
```bash
# Set multisig app deployment directory
export MULTISIG_DEPLOYMENT_DIR=cosmos-multisig-deployment
# Set path to custom network JSON file
export NETWORK_JSON_PATH=~/cerc/laconicd-stack/config/network.json
# Set network mode to host so that browser app and backend can use the same node localhost RPC URL
export USE_HOST_NETWORK=host
# Set local host URL for dgraph server
export DGRAPH_URL=http://localhost:8080/graphql
```
- Run playbook to setup cosmos multisig app

View File

@ -8,7 +8,7 @@
multisig_deployment_dir: "{{ lookup('env', 'MULTISIG_DEPLOYMENT_DIR') }}"
spec_output: "{{data_directory}}/cosmos-multisig-ui-spec.yml"
spec_template: "./templates/specs/cosmos-multisig-app-spec-template.yml.j2"
network_json: "{{ lookup('env', 'NETWORK_JSON_PATH') }}"
network_json: "../../config/network.json"
temp_network_json: "{{data_directory}}/temp_network.json"
tasks:
- name: Fail if DATA_DIRECTORY env var is not set
@ -18,7 +18,7 @@
- name: Clone cosmos-multisig-ui repo
shell: |
laconic-so fetch-stack git.vdb.to/cerc-io/cosmos-multisig-ui@v0.1.1 --git-ssh --pull
laconic-so fetch-stack git.vdb.to/cerc-io/cosmos-multisig-ui@v0.1.2 --git-ssh --pull
- name: Build container image
shell: |
@ -54,21 +54,18 @@
NEXT_PUBLIC_GAS_PRICE={{ next_public_gas_price }}
NEXT_PUBLIC_ADDRESS_PREFIX={{ next_public_address_prefix }}
NEXT_PUBLIC_IS_HTTP_ENABLED={{ next_public_is_http_enabled }}
USE_HOST_NETWORK={{ use_host_network }}
DGRAPH_DOMAIN={{ dgraph_domain }}
CHAIN_CONFIG_PATH="{{data_directory}}/{{ multisig_deployment_dir }}/config/cosmos-multisig-ui/network.json"
mode: '0644'
- name: Fail if NETWORK_JSON_PATH env var is not set
fail:
msg: "Environment variable NETWORK_JSON_PATH is not set. Please export it before running the playbook."
when: lookup('env', 'NETWORK_JSON_PATH') == ''
- name: Update network.json with environment endpoints
shell: |
RPC_VALUE=$(echo '{{ next_public_node_addresses }}' | jq -r '.[0]')
echo "Using RPC value: $RPC_VALUE"
jq --arg rpc "$RPC_VALUE" --arg rest "{{ node_rest_endpoint }}" \
'.rpc = $rpc | .rest = $rest' "{{ lookup('env', 'NETWORK_JSON_PATH') }}" > "{{ temp_network_json }}"
'.rpc = $rpc | .rest = $rest' "{{ network_json }}" > "{{ temp_network_json }}"
args:
executable: /bin/bash

View File

@ -3,7 +3,8 @@ next_public_registry_name: "laconic"
next_public_logo: ""
next_public_chain_id: "laconic-mainnet"
next_public_chain_display_name: "Laconic Mainnet"
next_public_node_addresses: ''
next_public_node_addresses: ""
node_rest_endpoint: ""
next_public_denom: "alnt"
next_public_display_denom: "ALNT"
next_public_display_denom_exponent: 18
@ -11,3 +12,5 @@ next_public_assets: '[{"denom_units":[{"denom":"alnt","exponent":0},{"denom":"al
next_public_gas_price: "0.01alnt"
next_public_address_prefix: "laconic"
next_public_is_http_enabled: false
use_host_network: ""
dgraph_domain: ""