diff --git a/docs/demo.md b/docs/demo.md index c131553..6a04efd 100644 --- a/docs/demo.md +++ b/docs/demo.md @@ -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 diff --git a/playbooks/cosmos-multisig-app/cosmos-multisig-app-start.yml b/playbooks/cosmos-multisig-app/cosmos-multisig-app-start.yml index 6ed2548..9e734ab 100644 --- a/playbooks/cosmos-multisig-app/cosmos-multisig-app-start.yml +++ b/playbooks/cosmos-multisig-app/cosmos-multisig-app-start.yml @@ -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 diff --git a/playbooks/cosmos-multisig-app/cosmos-multisig-vars.example.yml b/playbooks/cosmos-multisig-app/cosmos-multisig-vars.example.yml index 94d6266..3529142 100644 --- a/playbooks/cosmos-multisig-app/cosmos-multisig-vars.example.yml +++ b/playbooks/cosmos-multisig-app/cosmos-multisig-vars.example.yml @@ -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: ""