From f6be678bd554ea375d6b4805af9613ddc558e319 Mon Sep 17 00:00:00 2001 From: Neeraj Date: Mon, 28 Oct 2024 15:09:20 +0530 Subject: [PATCH 1/6] Update repo name --- stack-orchestrator/compose/docker-compose-laconic-shopify.yml | 4 ++-- .../container-build/cerc-laconic-shopify/build.sh | 2 +- stack-orchestrator/stacks/laconic-shopify/README.md | 2 +- stack-orchestrator/stacks/laconic-shopify/stack.yml | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/stack-orchestrator/compose/docker-compose-laconic-shopify.yml b/stack-orchestrator/compose/docker-compose-laconic-shopify.yml index 764f422..ea2fb05 100644 --- a/stack-orchestrator/compose/docker-compose-laconic-shopify.yml +++ b/stack-orchestrator/compose/docker-compose-laconic-shopify.yml @@ -12,8 +12,8 @@ services: CERC_ITEMS_PER_ORDER: ${CERC_ITEMS_PER_ORDER:-10} volumes: - shopify-data:/app/data - - ../config/laconic-shopify/start-shopify.sh:/app/start-faucet.sh - - ../config/laconic-shopify/product_pricings.json:/app/config/product_pricings.json + - ../config/shopify/start-shopify.sh:/app/start-faucet.sh + - ../config/shopify/product_pricings.json:/app/config/product_pricings.json extra_hosts: - "host.docker.internal:host-gateway" diff --git a/stack-orchestrator/container-build/cerc-laconic-shopify/build.sh b/stack-orchestrator/container-build/cerc-laconic-shopify/build.sh index a7156f7..027eac1 100755 --- a/stack-orchestrator/container-build/cerc-laconic-shopify/build.sh +++ b/stack-orchestrator/container-build/cerc-laconic-shopify/build.sh @@ -5,4 +5,4 @@ source ${CERC_CONTAINER_BASE_DIR}/build-base.sh SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) -docker build -t cerc/laconic-shopify:local ${build_command_args} -f ${SCRIPT_DIR}/Dockerfile ${CERC_REPO_BASE_DIR}/laconic-shopify +docker build -t cerc/laconic-shopify:local ${build_command_args} -f ${SCRIPT_DIR}/Dockerfile ${CERC_REPO_BASE_DIR}/shopify diff --git a/stack-orchestrator/stacks/laconic-shopify/README.md b/stack-orchestrator/stacks/laconic-shopify/README.md index 4a3560a..ef1c16b 100644 --- a/stack-orchestrator/stacks/laconic-shopify/README.md +++ b/stack-orchestrator/stacks/laconic-shopify/README.md @@ -22,7 +22,7 @@ Instructions for running the laconic shopify laconic-so --stack ~/cerc/testnet-laconicd-stack/stack-orchestrator/stacks/laconic-shopify build-containers ``` - This should create the `cerc/laconic-shopify-faucet` image locally + This should create the `cerc/laconic-shopify` image locally ## Create a deployment diff --git a/stack-orchestrator/stacks/laconic-shopify/stack.yml b/stack-orchestrator/stacks/laconic-shopify/stack.yml index 3b5fcbf..22131cf 100644 --- a/stack-orchestrator/stacks/laconic-shopify/stack.yml +++ b/stack-orchestrator/stacks/laconic-shopify/stack.yml @@ -2,7 +2,7 @@ version: "1.0" name: laconic-shopify description: "Service that integrates a Shopify app with the Laconic wallet." repos: - - git.vdb.to/cerc-io/laconic-shopify + - git.vdb.to/cerc-io/shopify containers: - cerc/laconic-shopify pods: -- 2.45.2 From bc6e8004073507a0b1ccc7b741b34bbcd7a515a9 Mon Sep 17 00:00:00 2001 From: Neeraj Date: Mon, 28 Oct 2024 17:42:03 +0530 Subject: [PATCH 2/6] Update shopify stack to run faucet together --- .../docker-compose-laconic-shopify.yml | 36 ++++++++++++++++--- .../laconic-shopify/product_pricings.json | 2 +- .../stacks/laconic-shopify/README.md | 33 ++++++++++++----- .../stacks/laconic-shopify/stack.yml | 3 ++ 4 files changed, 60 insertions(+), 14 deletions(-) diff --git a/stack-orchestrator/compose/docker-compose-laconic-shopify.yml b/stack-orchestrator/compose/docker-compose-laconic-shopify.yml index ea2fb05..4a18469 100644 --- a/stack-orchestrator/compose/docker-compose-laconic-shopify.yml +++ b/stack-orchestrator/compose/docker-compose-laconic-shopify.yml @@ -8,14 +8,42 @@ services: CERC_SHOPIFY_GRAPHQL_URL: ${CERC_SHOPIFY_GRAPHQL_URL} CERC_SHOPIFY_ACCESS_TOKEN: ${CERC_SHOPIFY_ACCESS_TOKEN} CERC_FETCH_ORDER_DELAY: ${CERC_FETCH_ORDER_DELAY:-10000} - CERC_FAUCET_URL: ${CERC_FAUCET_URL} + CERC_FAUCET_URL: ${CERC_FAUCET_URL:-'http://faucet:3000/'} CERC_ITEMS_PER_ORDER: ${CERC_ITEMS_PER_ORDER:-10} volumes: - shopify-data:/app/data - - ../config/shopify/start-shopify.sh:/app/start-faucet.sh - - ../config/shopify/product_pricings.json:/app/config/product_pricings.json + - ../config/laconic-shopify/start-shopify.sh:/app/start-faucet.sh + - ../config/laconic-shopify/product_pricings.json:/app/config/product_pricings.json + extra_hosts: + - "host.docker.internal:host-gateway" + depends_on: + faucet: + condition: service_healthy + + faucet: + restart: unless-stopped + image: cerc/laconic-shopify-faucet:local + command: ["bash", "-c", "./start-faucet.sh"] + environment: + CERC_SCRIPT_DEBUG: ${CERC_SCRIPT_DEBUG} + CERC_LACONICD_RPC_ENDPOINT: ${CERC_LACONICD_RPC_ENDPOINT:-http://laconicd:26657} + CERC_FAUCET_KEY: ${CERC_FAUCET_KEY} + CERC_LACONICD_CHAIN_ID: ${CERC_LACONICD_CHAIN_ID:-laconic_9000-1} + CERC_LACONICD_PREFIX: ${CERC_LACONICD_PREFIX:-laconic} + CERC_LACONICD_GAS_PRICE: ${CERC_LACONICD_GAS_PRICE:-1} + volumes: + - faucet-data:/app/db + - ../config/laconic-shopify-faucet/start-faucet.sh:/app/start-faucet.sh + - ../config/laconic-shopify-faucet/config-template.toml:/app/environments/config-template.toml + healthcheck: + test: ["CMD", "nc", "-vz", "127.0.0.1", "3000"] + interval: 10s + timeout: 5s + retries: 10 + start_period: 5s extra_hosts: - "host.docker.internal:host-gateway" volumes: - shopify-data: \ No newline at end of file + shopify-data: + faucet-data: \ No newline at end of file diff --git a/stack-orchestrator/config/laconic-shopify/product_pricings.json b/stack-orchestrator/config/laconic-shopify/product_pricings.json index 91e1b5e..75c4073 100644 --- a/stack-orchestrator/config/laconic-shopify/product_pricings.json +++ b/stack-orchestrator/config/laconic-shopify/product_pricings.json @@ -1,5 +1,5 @@ { - "10 pre-paid webapp deployments": "100000", + "10 webapp deployments": "100000", "100 webapp deployments": "1000000", "500 webapp deployments": "5000000", "1000 webapp deployments": "10000000" diff --git a/stack-orchestrator/stacks/laconic-shopify/README.md b/stack-orchestrator/stacks/laconic-shopify/README.md index ef1c16b..54d3d74 100644 --- a/stack-orchestrator/stacks/laconic-shopify/README.md +++ b/stack-orchestrator/stacks/laconic-shopify/README.md @@ -22,7 +22,7 @@ Instructions for running the laconic shopify laconic-so --stack ~/cerc/testnet-laconicd-stack/stack-orchestrator/stacks/laconic-shopify build-containers ``` - This should create the `cerc/laconic-shopify` image locally + This should create the `cerc/laconic-shopify` and `cerc/laconic-shopify-faucet` images locally ## Create a deployment @@ -43,20 +43,35 @@ Instructions for running the laconic shopify * Inside the `laconic-shopify-deployment` deployment directory, open `config.env` file and set following env variables: ```bash - # Shopify GraphQL URL - CERC_SHOPIFY_GRAPHQL_URL='https://6h071x-zw.myshopify.com/admin/api/2024-10/graphql.json' + # Shopify GraphQL URL (default: 'https://6h071x-zw.myshopify.com/admin/api/2024-10/graphql.json') + CERC_SHOPIFY_GRAPHQL_URL= # Access token for Shopify API CERC_SHOPIFY_ACCESS_TOKEN= - # Delay for fetching orders in milliseconds - CERC_FETCH_ORDER_DELAY=10000 + # Delay for fetching orders in milliseconds (default: 10000) + CERC_FETCH_ORDER_DELAY= - # URL for the laconic faucet - CERC_FAUCET_URL='http://host.docker.internal:3000/' + # URL for the laconic faucet (default: 'http://faucet:3000/') + CERC_FAUCET_URL= - # Number of line items per order in Get Orders GraphQL query - CERC_ITEMS_PER_ORDER=10 + # Number of line items per order in Get Orders GraphQL query (default: 10) + CERC_ITEMS_PER_ORDER= + + # Private key of a funded faucet account + CERC_FAUCET_KEY= + + # laconicd RPC endpoint (default: http://laconicd:26657) + CERC_LACONICD_RPC_ENDPOINT= + + # laconicd chain id (default: laconic_9000-1) + CERC_LACONICD_CHAIN_ID= + + # laconicd address prefix (default: laconic) + CERC_LACONICD_PREFIX= + + # laconicd gas price (default: 1) + CERC_LACONICD_GAS_PRICE= ``` ## Start the deployment diff --git a/stack-orchestrator/stacks/laconic-shopify/stack.yml b/stack-orchestrator/stacks/laconic-shopify/stack.yml index 22131cf..0df9771 100644 --- a/stack-orchestrator/stacks/laconic-shopify/stack.yml +++ b/stack-orchestrator/stacks/laconic-shopify/stack.yml @@ -3,7 +3,10 @@ name: laconic-shopify description: "Service that integrates a Shopify app with the Laconic wallet." repos: - git.vdb.to/cerc-io/shopify + - git.vdb.to/cerc-io/laconic-faucet@shopify containers: - cerc/laconic-shopify + - cerc/laconic-shopify-faucet pods: - laconic-shopify + - laconic-shopify-faucet -- 2.45.2 From c9658fe34ed176e6379fd608888255e56dfbea7a Mon Sep 17 00:00:00 2001 From: Neeraj Date: Mon, 28 Oct 2024 18:40:49 +0530 Subject: [PATCH 3/6] Remove unused code --- .../docker-compose-laconic-shopify-faucet.yml | 29 ----- .../docker-compose-laconic-shopify.yml | 4 +- .../config-template.toml | 0 .../start-faucet.sh | 0 .../config/laconic-shopify/start-shopify.sh | 2 +- .../stacks/laconic-shopify-faucet/README.md | 121 ------------------ .../stacks/laconic-shopify-faucet/stack.yml | 9 -- .../stacks/laconic-shopify/stack.yml | 1 - 8 files changed, 3 insertions(+), 163 deletions(-) delete mode 100644 stack-orchestrator/compose/docker-compose-laconic-shopify-faucet.yml rename stack-orchestrator/config/{laconic-shopify-faucet => laconic-shopify}/config-template.toml (100%) rename stack-orchestrator/config/{laconic-shopify-faucet => laconic-shopify}/start-faucet.sh (100%) delete mode 100644 stack-orchestrator/stacks/laconic-shopify-faucet/README.md delete mode 100644 stack-orchestrator/stacks/laconic-shopify-faucet/stack.yml diff --git a/stack-orchestrator/compose/docker-compose-laconic-shopify-faucet.yml b/stack-orchestrator/compose/docker-compose-laconic-shopify-faucet.yml deleted file mode 100644 index 0efa442..0000000 --- a/stack-orchestrator/compose/docker-compose-laconic-shopify-faucet.yml +++ /dev/null @@ -1,29 +0,0 @@ -services: - faucet: - restart: unless-stopped - image: cerc/laconic-shopify-faucet:local - command: ["bash", "-c", "./start-faucet.sh"] - environment: - CERC_SCRIPT_DEBUG: ${CERC_SCRIPT_DEBUG} - CERC_LACONICD_RPC_ENDPOINT: ${CERC_LACONICD_RPC_ENDPOINT:-http://laconicd:26657} - CERC_FAUCET_KEY: ${CERC_FAUCET_KEY} - CERC_LACONICD_CHAIN_ID: ${CERC_LACONICD_CHAIN_ID:-laconic_9000-1} - CERC_LACONICD_PREFIX: ${CERC_LACONICD_PREFIX:-laconic} - CERC_LACONICD_GAS_PRICE: ${CERC_LACONICD_GAS_PRICE:-1} - volumes: - - faucet-data:/app/db - - ../config/laconic-shopify-faucet/start-faucet.sh:/app/start-faucet.sh - - ../config/laconic-shopify-faucet/config-template.toml:/app/environments/config-template.toml - ports: - - 3000 - healthcheck: - test: ["CMD", "nc", "-vz", "127.0.0.1", "3000"] - interval: 10s - timeout: 5s - retries: 10 - start_period: 5s - extra_hosts: - - "host.docker.internal:host-gateway" - -volumes: - faucet-data: diff --git a/stack-orchestrator/compose/docker-compose-laconic-shopify.yml b/stack-orchestrator/compose/docker-compose-laconic-shopify.yml index 4a18469..8b0a45a 100644 --- a/stack-orchestrator/compose/docker-compose-laconic-shopify.yml +++ b/stack-orchestrator/compose/docker-compose-laconic-shopify.yml @@ -33,8 +33,8 @@ services: CERC_LACONICD_GAS_PRICE: ${CERC_LACONICD_GAS_PRICE:-1} volumes: - faucet-data:/app/db - - ../config/laconic-shopify-faucet/start-faucet.sh:/app/start-faucet.sh - - ../config/laconic-shopify-faucet/config-template.toml:/app/environments/config-template.toml + - ../config/laconic-shopify/start-faucet.sh:/app/start-faucet.sh + - ../config/laconic-shopify/config-template.toml:/app/environments/config-template.toml healthcheck: test: ["CMD", "nc", "-vz", "127.0.0.1", "3000"] interval: 10s diff --git a/stack-orchestrator/config/laconic-shopify-faucet/config-template.toml b/stack-orchestrator/config/laconic-shopify/config-template.toml similarity index 100% rename from stack-orchestrator/config/laconic-shopify-faucet/config-template.toml rename to stack-orchestrator/config/laconic-shopify/config-template.toml diff --git a/stack-orchestrator/config/laconic-shopify-faucet/start-faucet.sh b/stack-orchestrator/config/laconic-shopify/start-faucet.sh similarity index 100% rename from stack-orchestrator/config/laconic-shopify-faucet/start-faucet.sh rename to stack-orchestrator/config/laconic-shopify/start-faucet.sh diff --git a/stack-orchestrator/config/laconic-shopify/start-shopify.sh b/stack-orchestrator/config/laconic-shopify/start-shopify.sh index d7ec38e..72fd3b2 100755 --- a/stack-orchestrator/config/laconic-shopify/start-shopify.sh +++ b/stack-orchestrator/config/laconic-shopify/start-shopify.sh @@ -18,4 +18,4 @@ export FETCH_ORDER_DELAY=$CERC_FETCH_ORDER_DELAY export FAUCET_URL=$CERC_FAUCET_URL export ITEMS_PER_ORDER=$CERC_ITEMS_PER_ORDER -yarn start \ No newline at end of file +yarn start diff --git a/stack-orchestrator/stacks/laconic-shopify-faucet/README.md b/stack-orchestrator/stacks/laconic-shopify-faucet/README.md deleted file mode 100644 index 8f875c7..0000000 --- a/stack-orchestrator/stacks/laconic-shopify-faucet/README.md +++ /dev/null @@ -1,121 +0,0 @@ -# laconic-shopify-faucet - -Instructions for running the laconic faucet - -## Setup - -* Clone the stack repo: - - ```bash - laconic-so fetch-stack git.vdb.to/cerc-io/testnet-laconicd-stack - ``` - -* Clone the laconic-faucet respository: - - ```bash - laconic-so --stack ~/cerc/testnet-laconicd-stack/stack-orchestrator/stacks/laconic-shopify-faucet setup-repositories - ``` - -* Build the container image: - - ```bash - laconic-so --stack ~/cerc/testnet-laconicd-stack/stack-orchestrator/stacks/laconic-shopify-faucet build-containers - ``` - - This should create the `cerc/laconic-shopify-faucet` image locally - -## Create a deployment - -* Create a spec file for the deployment: - - ```bash - laconic-so --stack ~/cerc/testnet-laconicd-stack/stack-orchestrator/stacks/laconic-shopify-faucet deploy init --output laconic-shopify-faucet-spec.yml - ``` - -* Edit `network` in the spec file to map container ports to host ports as required: - - ```bash - network: - ports: - faucet: - - '3000:3000' - ``` - -* Create a deployment from the spec file: - - ```bash - laconic-so --stack ~/cerc/testnet-laconicd-stack/stack-orchestrator/stacks/laconic-shopify-faucet deploy create --spec-file laconic-shopify-faucet-spec.yml --deployment-dir laconic-shopify-faucet-deployment - ``` - -## Configuration - -* Inside the `laconic-shopify-faucet-deployment` deployment directory, open `config.env` file and set following env variables: - - ```bash - # Private key of a funded faucet account - CERC_FAUCET_KEY= - - # Optional - - # laconicd RPC endpoint (default: http://laconicd:26657) - CERC_LACONICD_RPC_ENDPOINT= - - # laconicd chain id (default: laconic_9000-1) - CERC_LACONICD_CHAIN_ID= - - # laconicd address prefix (default: laconic) - CERC_LACONICD_PREFIX= - - # laconicd gas price (default: 1) - CERC_LACONICD_GAS_PRICE= - ``` - -## Start the deployment - - ```bash - laconic-so deployment --dir laconic-shopify-faucet-deployment start - ``` - -## Check status - -* To list down and monitor the running container: - - ```bash - # With status - docker ps - - # Check logs for a container - docker logs -f - ``` - -## Run - -* Request tokens from the faucet for an account: - - ```bash - curl -X POST http://localhost:3000/faucet \ - -H "Content-Type: application/json" \ - -d '{"address": ""}' - - # Expected output: - # {"success":true,"txHash":""} - ``` - -## Clean up - -* Stop the `laconic-shopify-faucet` service running in the background: - - ```bash - # Stop the docker container - laconic-so deployment --dir laconic-shopify-faucet-deployment stop - ``` - -* To stop the service and also delete data: - - ```bash - # Stop the docker containers - laconic-so deployment --dir laconic-shopify-faucet-deployment stop --delete-volumes - - # Remove deployment directory (deployment will have to be recreated for a re-run) - rm -r laconic-shopify-faucet-deployment - ``` diff --git a/stack-orchestrator/stacks/laconic-shopify-faucet/stack.yml b/stack-orchestrator/stacks/laconic-shopify-faucet/stack.yml deleted file mode 100644 index 86be391..0000000 --- a/stack-orchestrator/stacks/laconic-shopify-faucet/stack.yml +++ /dev/null @@ -1,9 +0,0 @@ -version: "1.0" -name: laconic-shopify-faucet -description: "Faucet for shopify app" -repos: - - git.vdb.to/cerc-io/laconic-faucet@shopify -containers: - - cerc/laconic-shopify-faucet -pods: - - laconic-shopify-faucet diff --git a/stack-orchestrator/stacks/laconic-shopify/stack.yml b/stack-orchestrator/stacks/laconic-shopify/stack.yml index 0df9771..761caed 100644 --- a/stack-orchestrator/stacks/laconic-shopify/stack.yml +++ b/stack-orchestrator/stacks/laconic-shopify/stack.yml @@ -9,4 +9,3 @@ containers: - cerc/laconic-shopify-faucet pods: - laconic-shopify - - laconic-shopify-faucet -- 2.45.2 From 7ac1f1178d560eded8bd75a5f673a18c510d7e5a Mon Sep 17 00:00:00 2001 From: Neeraj Date: Tue, 29 Oct 2024 10:47:31 +0530 Subject: [PATCH 4/6] Update deployment from scratch document about shopify stack --- ops/deployments-from-scratch.md | 117 ++++++++++++++++++ .../docker-compose-laconic-shopify.yml | 4 +- .../stacks/laconic-shopify/README.md | 3 - 3 files changed, 119 insertions(+), 5 deletions(-) diff --git a/ops/deployments-from-scratch.md b/ops/deployments-from-scratch.md index 2833ba9..de39327 100644 --- a/ops/deployments-from-scratch.md +++ b/ops/deployments-from-scratch.md @@ -714,6 +714,123 @@ +
+ Shopify + +## Shopify + +* Stack: + +* Source repo: + +* Target dir: `/srv/shopify/laconic-shopify-deployment` + +* Cleanup an existing deployment if required: + + ```bash + cd /srv/shopify + + # Stop the deployment + laconic-so deployment --dir laconic-shopify-deployment stop + + # Remove the deployment dir + sudo rm -rf laconic-shopify-deployment + + # Remove the existing spec file + rm laconic-shopify-spec.yml + ``` + +### Setup + +* Clone the stack repo: + + ```bash + laconic-so fetch-stack git.vdb.to/cerc-io/testnet-laconicd-stack --pull + + # This should clone the testnet-laconicd-stack repo at `/home/dev/cerc/testnet-laconicd-stack` + ``` + +* Clone required repositories: + + ```bash + laconic-so --stack ~/cerc/testnet-laconicd-stack/stack-orchestrator/stacks/laconic-shopify setup-repositories --pull + + # This should clone the laconicd repos at `/home/dev/cerc/shopify` and `/home/dev/cerc/laconic-faucet` + ``` + +* Build the container images: + + ```bash + laconic-so --stack ~/cerc/testnet-laconicd-stack/stack-orchestrator/stacks/laconic-shopify build-containers --force-rebuild + + # This should create the "cerc/laconic-shopify" and "cerc/laconic-shopify-faucet" Docker images + ``` + +### Deployment + +* Create a spec file for the deployment: + + ```bash + cd /srv/shopify + + laconic-so --stack ~/cerc/testnet-laconicd-stack/stack-orchestrator/stacks/laconic-shopify deploy init --output laconic-shopify-spec.yml + ``` + +* Create a deployment from the spec file: + + ```bash + laconic-so --stack ~/cerc/testnet-laconicd-stack/stack-orchestrator/stacks/laconic-shopify deploy create --spec-file laconic-shopify-spec.yml --deployment-dir laconic-shopify-deployment + ``` + +* Inside the `laconic-shopify-deployment` deployment directory, open `config.env` file and set following env variables: + + ```bash + # Shopify GraphQL URL + CERC_SHOPIFY_GRAPHQL_URL='https://6h071x-zw.myshopify.com/admin/api/2024-10/graphql.json' + + # Access token for Shopify API + CERC_SHOPIFY_ACCESS_TOKEN= + + # Delay for fetching orders in milliseconds + CERC_FETCH_ORDER_DELAY=10000 + + # Number of line items per order in Get Orders GraphQL query + CERC_ITEMS_PER_ORDER=10 + + # Private key of a funded faucet account + CERC_FAUCET_KEY= + + # laconicd RPC endpoint + CERC_LACONICD_RPC_ENDPOINT='http://laconicd:26657' + + # laconicd chain id + CERC_LACONICD_CHAIN_ID=laconic-testnet-2 + + # laconicd address prefix + CERC_LACONICD_PREFIX=laconic + + # laconicd gas price + CERC_LACONICD_GAS_PRICE=0.001 + ``` + +### Start + +* Start the deployment: + + ```bash + laconic-so deployment --dir laconic-shopify-deployment start + ``` + +* Check status: + + ```bash + # Check logs for faucet and shopify containers + laconic-so deployment --dir laconic-shopify-deployment logs shopify -f + laconic-so deployment --dir laconic-shopify-deployment logs faucet -f + ``` + +
+
testnet-onboarding-app diff --git a/stack-orchestrator/compose/docker-compose-laconic-shopify.yml b/stack-orchestrator/compose/docker-compose-laconic-shopify.yml index 8b0a45a..9df68cf 100644 --- a/stack-orchestrator/compose/docker-compose-laconic-shopify.yml +++ b/stack-orchestrator/compose/docker-compose-laconic-shopify.yml @@ -8,11 +8,11 @@ services: CERC_SHOPIFY_GRAPHQL_URL: ${CERC_SHOPIFY_GRAPHQL_URL} CERC_SHOPIFY_ACCESS_TOKEN: ${CERC_SHOPIFY_ACCESS_TOKEN} CERC_FETCH_ORDER_DELAY: ${CERC_FETCH_ORDER_DELAY:-10000} - CERC_FAUCET_URL: ${CERC_FAUCET_URL:-'http://faucet:3000/'} + CERC_FAUCET_URL: http://faucet:3000/ CERC_ITEMS_PER_ORDER: ${CERC_ITEMS_PER_ORDER:-10} volumes: - shopify-data:/app/data - - ../config/laconic-shopify/start-shopify.sh:/app/start-faucet.sh + - ../config/laconic-shopify/start-shopify.sh:/app/start-shopify.sh - ../config/laconic-shopify/product_pricings.json:/app/config/product_pricings.json extra_hosts: - "host.docker.internal:host-gateway" diff --git a/stack-orchestrator/stacks/laconic-shopify/README.md b/stack-orchestrator/stacks/laconic-shopify/README.md index 54d3d74..93ff1a6 100644 --- a/stack-orchestrator/stacks/laconic-shopify/README.md +++ b/stack-orchestrator/stacks/laconic-shopify/README.md @@ -52,9 +52,6 @@ Instructions for running the laconic shopify # Delay for fetching orders in milliseconds (default: 10000) CERC_FETCH_ORDER_DELAY= - # URL for the laconic faucet (default: 'http://faucet:3000/') - CERC_FAUCET_URL= - # Number of line items per order in Get Orders GraphQL query (default: 10) CERC_ITEMS_PER_ORDER= -- 2.45.2 From ea8d157fb00003034da2ce89de4d5c256df768cb Mon Sep 17 00:00:00 2001 From: Prathamesh Musale Date: Tue, 29 Oct 2024 14:33:52 +0530 Subject: [PATCH 5/6] Update RPC endpoint in instructions --- ops/deployments-from-scratch.md | 2 +- .../compose/docker-compose-laconic-shopify.yml | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ops/deployments-from-scratch.md b/ops/deployments-from-scratch.md index de39327..1fed5a4 100644 --- a/ops/deployments-from-scratch.md +++ b/ops/deployments-from-scratch.md @@ -801,7 +801,7 @@ CERC_FAUCET_KEY= # laconicd RPC endpoint - CERC_LACONICD_RPC_ENDPOINT='http://laconicd:26657' + CERC_LACONICD_RPC_ENDPOINT='http://host.docker.internal:36657' # laconicd chain id CERC_LACONICD_CHAIN_ID=laconic-testnet-2 diff --git a/stack-orchestrator/compose/docker-compose-laconic-shopify.yml b/stack-orchestrator/compose/docker-compose-laconic-shopify.yml index 9df68cf..75dcded 100644 --- a/stack-orchestrator/compose/docker-compose-laconic-shopify.yml +++ b/stack-orchestrator/compose/docker-compose-laconic-shopify.yml @@ -2,6 +2,9 @@ services: shopify: restart: unless-stopped image: cerc/laconic-shopify:local + depends_on: + faucet: + condition: service_healthy command: ["bash", "-c", "./start-faucet.sh"] environment: CERC_SCRIPT_DEBUG: ${CERC_SCRIPT_DEBUG} @@ -16,9 +19,6 @@ services: - ../config/laconic-shopify/product_pricings.json:/app/config/product_pricings.json extra_hosts: - "host.docker.internal:host-gateway" - depends_on: - faucet: - condition: service_healthy faucet: restart: unless-stopped -- 2.45.2 From cf670cc97124a750d481ce48fa4e861fc6938a19 Mon Sep 17 00:00:00 2001 From: Neeraj Date: Wed, 30 Oct 2024 10:03:10 +0530 Subject: [PATCH 6/6] Update default config values --- ops/deployments-from-scratch.md | 2 +- .../compose/docker-compose-laconic-shopify.yml | 6 +++--- stack-orchestrator/stacks/laconic-shopify/README.md | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/ops/deployments-from-scratch.md b/ops/deployments-from-scratch.md index 1fed5a4..6130485 100644 --- a/ops/deployments-from-scratch.md +++ b/ops/deployments-from-scratch.md @@ -801,7 +801,7 @@ CERC_FAUCET_KEY= # laconicd RPC endpoint - CERC_LACONICD_RPC_ENDPOINT='http://host.docker.internal:36657' + CERC_LACONICD_RPC_ENDPOINT='https://laconicd-sapo.laconic.com' # laconicd chain id CERC_LACONICD_CHAIN_ID=laconic-testnet-2 diff --git a/stack-orchestrator/compose/docker-compose-laconic-shopify.yml b/stack-orchestrator/compose/docker-compose-laconic-shopify.yml index 75dcded..f274b93 100644 --- a/stack-orchestrator/compose/docker-compose-laconic-shopify.yml +++ b/stack-orchestrator/compose/docker-compose-laconic-shopify.yml @@ -26,11 +26,11 @@ services: command: ["bash", "-c", "./start-faucet.sh"] environment: CERC_SCRIPT_DEBUG: ${CERC_SCRIPT_DEBUG} - CERC_LACONICD_RPC_ENDPOINT: ${CERC_LACONICD_RPC_ENDPOINT:-http://laconicd:26657} + CERC_LACONICD_RPC_ENDPOINT: ${CERC_LACONICD_RPC_ENDPOINT:-https://laconicd-sapo.laconic.com} CERC_FAUCET_KEY: ${CERC_FAUCET_KEY} - CERC_LACONICD_CHAIN_ID: ${CERC_LACONICD_CHAIN_ID:-laconic_9000-1} + CERC_LACONICD_CHAIN_ID: ${CERC_LACONICD_CHAIN_ID:-laconic-testnet-2} CERC_LACONICD_PREFIX: ${CERC_LACONICD_PREFIX:-laconic} - CERC_LACONICD_GAS_PRICE: ${CERC_LACONICD_GAS_PRICE:-1} + CERC_LACONICD_GAS_PRICE: ${CERC_LACONICD_GAS_PRICE:-0.001} volumes: - faucet-data:/app/db - ../config/laconic-shopify/start-faucet.sh:/app/start-faucet.sh diff --git a/stack-orchestrator/stacks/laconic-shopify/README.md b/stack-orchestrator/stacks/laconic-shopify/README.md index 93ff1a6..e3aac49 100644 --- a/stack-orchestrator/stacks/laconic-shopify/README.md +++ b/stack-orchestrator/stacks/laconic-shopify/README.md @@ -58,16 +58,16 @@ Instructions for running the laconic shopify # Private key of a funded faucet account CERC_FAUCET_KEY= - # laconicd RPC endpoint (default: http://laconicd:26657) + # laconicd RPC endpoint (default: https://laconicd-sapo.laconic.com/) CERC_LACONICD_RPC_ENDPOINT= - # laconicd chain id (default: laconic_9000-1) + # laconicd chain id (default: laconic-testnet-2) CERC_LACONICD_CHAIN_ID= # laconicd address prefix (default: laconic) CERC_LACONICD_PREFIX= - # laconicd gas price (default: 1) + # laconicd gas price (default: 0.001) CERC_LACONICD_GAS_PRICE= ``` -- 2.45.2