From c892c8811ea5edb4edc9e391497e0390c724f0ab Mon Sep 17 00:00:00 2001 From: Neeraj Date: Mon, 28 Oct 2024 12:54:16 +0530 Subject: [PATCH] Use default env values for shopify stack --- .../compose/docker-compose-laconic-shopify.yml | 5 +++-- .../config/laconic-shopify/product_pricings.json | 2 +- stack-orchestrator/config/laconic-shopify/start-shopify.sh | 6 ++++-- stack-orchestrator/stacks/laconic-shopify/README.md | 7 +++++-- 4 files changed, 13 insertions(+), 7 deletions(-) diff --git a/stack-orchestrator/compose/docker-compose-laconic-shopify.yml b/stack-orchestrator/compose/docker-compose-laconic-shopify.yml index a832c60..764f422 100644 --- a/stack-orchestrator/compose/docker-compose-laconic-shopify.yml +++ b/stack-orchestrator/compose/docker-compose-laconic-shopify.yml @@ -5,10 +5,11 @@ services: command: ["bash", "-c", "./start-faucet.sh"] environment: CERC_SCRIPT_DEBUG: ${CERC_SCRIPT_DEBUG} - CERC_SHOPIFY_SHOP_NAME: ${CERC_SHOPIFY_SHOP_NAME} + CERC_SHOPIFY_GRAPHQL_URL: ${CERC_SHOPIFY_GRAPHQL_URL} CERC_SHOPIFY_ACCESS_TOKEN: ${CERC_SHOPIFY_ACCESS_TOKEN} - CERC_FETCH_ORDER_DELAY: ${CERC_FETCH_ORDER_DELAY} + CERC_FETCH_ORDER_DELAY: ${CERC_FETCH_ORDER_DELAY:-10000} CERC_FAUCET_URL: ${CERC_FAUCET_URL} + CERC_ITEMS_PER_ORDER: ${CERC_ITEMS_PER_ORDER:-10} volumes: - shopify-data:/app/data - ../config/laconic-shopify/start-shopify.sh:/app/start-faucet.sh diff --git a/stack-orchestrator/config/laconic-shopify/product_pricings.json b/stack-orchestrator/config/laconic-shopify/product_pricings.json index 75c4073..91e1b5e 100644 --- a/stack-orchestrator/config/laconic-shopify/product_pricings.json +++ b/stack-orchestrator/config/laconic-shopify/product_pricings.json @@ -1,5 +1,5 @@ { - "10 webapp deployments": "100000", + "10 pre-paid webapp deployments": "100000", "100 webapp deployments": "1000000", "500 webapp deployments": "5000000", "1000 webapp deployments": "10000000" diff --git a/stack-orchestrator/config/laconic-shopify/start-shopify.sh b/stack-orchestrator/config/laconic-shopify/start-shopify.sh index b25c3cb..d7ec38e 100755 --- a/stack-orchestrator/config/laconic-shopify/start-shopify.sh +++ b/stack-orchestrator/config/laconic-shopify/start-shopify.sh @@ -6,14 +6,16 @@ if [ -n "$CERC_SCRIPT_DEBUG" ]; then set -x fi -echo "Shopify shop name: $CERC_SHOPIFY_SHOP_NAME" +echo "Shopify GraphQL URL: $CERC_SHOPIFY_GRAPHQL_URL" echo "Shopify access token: $CERC_SHOPIFY_ACCESS_TOKEN" echo "Fetch order delay: $CERC_FETCH_ORDER_DELAY" echo "Faucet URL: $CERC_FAUCET_URL" +echo "Number of line items per order: $CERC_ITEMS_PER_ORDER" -export SHOPIFY_SHOP_NAME=$CERC_SHOPIFY_SHOP_NAME +export SHOPIFY_GRAPHQL_URL=$CERC_SHOPIFY_GRAPHQL_URL export SHOPIFY_ACCESS_TOKEN=$CERC_SHOPIFY_ACCESS_TOKEN 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 diff --git a/stack-orchestrator/stacks/laconic-shopify/README.md b/stack-orchestrator/stacks/laconic-shopify/README.md index 6bf8554..4a3560a 100644 --- a/stack-orchestrator/stacks/laconic-shopify/README.md +++ b/stack-orchestrator/stacks/laconic-shopify/README.md @@ -43,8 +43,8 @@ Instructions for running the laconic shopify * Inside the `laconic-shopify-deployment` deployment directory, open `config.env` file and set following env variables: ```bash - # Shopify shop name - CERC_SHOPIFY_SHOP_NAME= + # 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= @@ -54,6 +54,9 @@ Instructions for running the laconic shopify # URL for the laconic faucet CERC_FAUCET_URL='http://host.docker.internal:3000/' + + # Number of line items per order in Get Orders GraphQL query + CERC_ITEMS_PER_ORDER=10 ``` ## Start the deployment