Update shopify stack to run faucet together

This commit is contained in:
Neeraj 2024-10-28 17:42:03 +05:30
parent f6be678bd5
commit bc6e800407
4 changed files with 60 additions and 14 deletions

View File

@ -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:
shopify-data:
faucet-data:

View File

@ -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"

View File

@ -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

View File

@ -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