Add a laconic-faucet stack #7

Merged
nabarun merged 16 commits from ag-laconic-faucet-stack into main 2024-07-18 14:45:02 +00:00
2 changed files with 12 additions and 12 deletions
Showing only changes of commit b00dcb66c8 - Show all commits

View File

@ -3,11 +3,11 @@ services:
restart: unless-stopped
image: cerc/laconic-faucet:local
environment:
${CERC_SCRIPT_DEBUG}
${CERC_FAUCET_KEY}
volumes:
- ../config/laconic-faucet/start-server.sh:/start-server.sh
ports:
- "3000"
CERC_SCRIPT_DEBUG: ${CERC_SCRIPT_DEBUG}
CERC_FAUCET_KEY: ${CERC_FAUCET_KEY}
entrypoint: "bash"
command: "/start-server.sh"
command: "./start-faucet.sh"
volumes:
- ../config/laconic-faucet/start-faucet.sh:/app/start-faucet.sh
ports:
- "3000:3000"

View File

@ -1,17 +1,16 @@
#!/bin/bash
set -e
set -u
if [ -n "$CERC_SCRIPT_DEBUG" ]; then
set -x
fi
set -u
yarn install
toml_file = "/app/environments/local.toml"
toml_file="./environments/local.toml"
# Set faucet key from env
faucet_key = ${CERC_FAUCET_KEY}
faucet_key=${CERC_FAUCET_KEY}
echo "The faucet key is $faucet_key"
# Update the faucetKey in local.toml
sed -i "s/faucetKey = \"\"/faucetKey = \"$faucet_key\"/" "$toml_file"
@ -19,3 +18,4 @@ echo "Updated faucetKey in local.toml"
# Start node-js server
yarn start-faucet
echo "Started faucet"