Skip to content

Commit

Permalink
Merge pull request #265 from fedimint/wo/nix-mprocs-improvements
Browse files Browse the repository at this point in the history
Add guardian ui to `nix-gateway`, fix scripts not exiting
  • Loading branch information
justinmoon authored Nov 6, 2023
2 parents 1596cd5 + e093b41 commit 14894f1
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 0 deletions.
7 changes: 7 additions & 0 deletions mprocs-nix-gateway.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,13 @@ procs:
shell: tail -n +0 -F $FM_LOGS_DIR/devimint.log
gateway-ui:
shell: bash --init-file scripts/mprocs-nix-gateway.sh
stop: SIGKILL
env:
PORT: '3004'
BROWSER: none
guardian-ui:
shell: bash --init-file scripts/mprocs-nix-guardian.sh
stop: SIGKILL
env:
PORT: '3000'
BROWSER: none
2 changes: 2 additions & 0 deletions scripts/mprocs-nix-gateway.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# shellcheck shell=bash

set -eo pipefail

eval "$(devimint env)"

echo Waiting for devimint to start up fedimint and gateway
Expand Down
21 changes: 21 additions & 0 deletions scripts/mprocs-nix-guardian.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# shellcheck shell=bash

set -eo pipefail

eval "$(devimint env)"

echo Waiting for devimint to start up fedimint and gateway

STATUS="$(devimint wait)"
if [ "$STATUS" = "ERROR" ]
then
echo "fedimint didn't start correctly"
echo "See other panes for errors"
exit 1
fi

# Conigure UI env from devimint env
CONFIG_PORT=$(($FM_PORT_FEDIMINTD_BASE + 1)) # Fedimintd 0 config AOU port is always base + 1
export REACT_APP_FM_CONFIG_API="ws://127.0.0.1:$CONFIG_PORT"

yarn dev:guardian-ui

0 comments on commit 14894f1

Please sign in to comment.