Skip to content

Commit

Permalink
Changes from PR #72
Browse files Browse the repository at this point in the history
  • Loading branch information
Incede committed Sep 26, 2024
1 parent 969b0bc commit 175a513
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 3 deletions.
4 changes: 2 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ services:
ports:
- ${RELAYER_1_API_SERVER_HOST:-0.0.0.0}:${RELAYER_1_API_SERVER_PORT:-3000}:${RELAYER_1_API_SERVER_PORT:-3000}
healthcheck:
test: curl --fail http://relayer_1:${RELAYER_1_API_SERVER_PORT:-3000}/healthz
test: echo $$(wget --server-response http://relayer_1:${RELAYER_1_API_SERVER_PORT:-3000}/healthz 2>&1 | grep '200 OK') | grep '200' || exit 1
extra_hosts:
- "host.docker.internal:host-gateway"

Expand Down Expand Up @@ -66,7 +66,7 @@ services:
ports:
- ${REBALANCER_API_SERVER_HOST:-0.0.0.0}:${REBALANCER_API_SERVER_PORT:-3001}:${REBALANCER_API_SERVER_PORT:-3001}
healthcheck:
test: curl --fail http://rebalancer:${REBALANCER_API_SERVER_PORT:-3001}/healthz
test: echo $$(wget --server-response http://relayer_1:${RELAYER_1_API_SERVER_PORT:-3000}/healthz 2>&1 | grep '200 OK') | grep '200' || exit 1
extra_hosts:
- "host.docker.internal:host-gateway"

Expand Down
6 changes: 6 additions & 0 deletions scripts/lisk/docker/mainnet/setCommon.env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,12 @@ echo "RPC_PROVIDER_GELATO_1135=$RPC_PROVIDER_GELATO_1135" >> ${env_file}
SLACK_CONFIG=`echo $RELAYER_CONFIG | jq -r ."SLACK_CONFIG"`
echo "SLACK_CONFIG=$SLACK_CONFIG" >> ${env_file}

API_SERVER_HOST=`echo $RELAYER_CONFIG | jq -r ."RELAYER_1_API_SERVER_HOST"`
echo "API_SERVER_HOST=$API_SERVER_HOST" >> ${app_dir}/.env

API_SERVER_PORT=`echo $RELAYER_CONFIG | jq -r ."RELAYER_1_API_SERVER_PORT"`
echo "API_SERVER_PORT=$API_SERVER_PORT" >> ${app_dir}/.env

echo "All env vars from secrets are set."

# Set the bot identifier
Expand Down
6 changes: 6 additions & 0 deletions scripts/lisk/docker/sepolia/setCommonEnv.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,12 @@ echo "RPC_PROVIDER_GELATO_4202=$RPC_PROVIDER_GELATO_4202" >> ${env_file}
HUB_CHAIN_ID=`echo $RELAYER_CONFIG | jq -r ."HUB_CHAIN_ID"`
echo "HUB_CHAIN_ID=$HUB_CHAIN_ID" >> ${env_file}

API_SERVER_HOST=`echo $RELAYER_CONFIG | jq -r ."RELAYER_1_API_SERVER_HOST"`
echo "API_SERVER_HOST=$API_SERVER_HOST" >> ${app_dir}/.env

API_SERVER_PORT=`echo $RELAYER_CONFIG | jq -r ."RELAYER_1_API_SERVER_PORT"`
echo "API_SERVER_PORT=$API_SERVER_PORT" >> ${app_dir}/.env

echo "All env vars from secrets are set."

# Set the bot identifier
Expand Down
2 changes: 1 addition & 1 deletion src/api/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ dotenv.config();

export function runAPIServer(logger: winston.Logger): void {
const app: Express = express();
const host = process.env.API_SERVER_HOST || "127.0.0.1";
const host = process.env.API_SERVER_HOST || "0.0.0.0";
const port = Number(process.env.API_SERVER_PORT) || 3000;

app.use("/healthz", healthz());
Expand Down

0 comments on commit 175a513

Please sign in to comment.