19 lines
376 B
Bash
Executable file
19 lines
376 B
Bash
Executable file
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
ROOT_DIR=/workspace
|
|
TXNBOT_ENV_FILE=$ROOT_DIR/tmp/podman/txnBot.env
|
|
BOT_DIR=$ROOT_DIR/services/txnBot
|
|
|
|
while [[ ! -f "$TXNBOT_ENV_FILE" ]]; do
|
|
echo "[txn-bot-entrypoint] waiting for env file"
|
|
sleep 2
|
|
done
|
|
|
|
cd "$BOT_DIR"
|
|
if [[ ! -d node_modules ]]; then
|
|
npm install
|
|
fi
|
|
|
|
export TXN_BOT_ENV_FILE="$TXNBOT_ENV_FILE"
|
|
exec npm run start
|