Add stack for shopify faucet
This commit is contained in:
parent
81923f5323
commit
5c64ed0ea5
@ -0,0 +1,27 @@
|
||||
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}
|
||||
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:
|
@ -0,0 +1,12 @@
|
||||
[upstream]
|
||||
rpcEndpoint = "REPLACE_WITH_CERC_LACONICD_RPC_ENDPOINT"
|
||||
chainId = "laconic_9000-1"
|
||||
denom = "alnt"
|
||||
prefix = "laconic"
|
||||
gasPrice = "1"
|
||||
faucetKey = "REPLACE_WITH_CERC_FAUCET_KEY"
|
||||
|
||||
[server]
|
||||
port=3000
|
||||
enableRateLimit=false
|
||||
dbDir = "db"
|
26
stack-orchestrator/config/laconic-shopify-faucet/start-faucet.sh
Executable file
26
stack-orchestrator/config/laconic-shopify-faucet/start-faucet.sh
Executable file
@ -0,0 +1,26 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
set -u
|
||||
if [ -n "$CERC_SCRIPT_DEBUG" ]; then
|
||||
set -x
|
||||
fi
|
||||
|
||||
config_template=$(cat environments/config-template.toml)
|
||||
target_config="./environments/local.toml"
|
||||
|
||||
# Check if faucet key is set
|
||||
if [ -z "${CERC_FAUCET_KEY:-}" ]; then
|
||||
echo "Error: CERC_FAUCET_KEY is not set. Exiting..."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Using laconicd RPC endpoint: $CERC_LACONICD_RPC_ENDPOINT"
|
||||
|
||||
FAUCET_CONFIG=$(echo "$config_template" | \
|
||||
sed -E "s|REPLACE_WITH_CERC_FAUCET_KEY|${CERC_FAUCET_KEY}|g; \
|
||||
s|REPLACE_WITH_CERC_LACONICD_RPC_ENDPOINT|${CERC_LACONICD_RPC_ENDPOINT}|g; ")
|
||||
|
||||
echo "$FAUCET_CONFIG" > $target_config
|
||||
echo "Starting faucet..."
|
||||
node dist/index.js
|
5
stack-orchestrator/container-build/cerc-laconic-shopify-faucet/build.sh
Executable file
5
stack-orchestrator/container-build/cerc-laconic-shopify-faucet/build.sh
Executable file
@ -0,0 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Build cerc/laconic-shopify-faucet
|
||||
source ${CERC_CONTAINER_BASE_DIR}/build-base.sh
|
||||
docker build -t cerc/laconic-shopify-faucet:local ${build_command_args} ${CERC_REPO_BASE_DIR}/laconic-faucet
|
@ -0,0 +1 @@
|
||||
# Laconic Shopify Faucet
|
@ -0,0 +1,9 @@
|
||||
version: "1.0"
|
||||
name: laconic-shopify-faucet
|
||||
description: "Faucet for shopify app"
|
||||
repos:
|
||||
- git.vdb.to/cerc-io/laconic-faucet@sk-shopify-faucet
|
||||
containers:
|
||||
- cerc/laconic-shopify-faucet
|
||||
pods:
|
||||
- laconic-faucet
|
Loading…
Reference in New Issue
Block a user