diff --git a/hack/tfw_magic_start.sh b/hack/tfw_magic_start.sh index dadf54c..d8f5dd4 100755 --- a/hack/tfw_magic_start.sh +++ b/hack/tfw_magic_start.sh @@ -5,12 +5,15 @@ set -eo pipefail SCRIPT_DIR="$(dirname $($readlink_cmd -f $0))" TAO_PATH="${TAO_PATH:-$SCRIPT_DIR/../..}" +BASEIMAGE_REPO="${BASEIMAGE_REPO:-baseimage-tutorial-framework}" BACKEND_REPO="${BACKEND_REPO:-test-tutorial-framework}" FRONTEND_REPO="${FRONTEND_REPO:-frontend-tutorial-framework}" +BASEIMAGE_PATH="${TAO_PATH}/${BASEIMAGE_REPO}" BACKEND_PATH="${TAO_PATH}/${BACKEND_REPO}" FRONTEND_PATH="${TAO_PATH}/${FRONTEND_REPO}" -IMAGE_NAME="${IMAGE_NAME:-baseimage-tutorial-framework}" +BASEIMAGE_NAME="${BASEIMAGE_NAME:-baseimage-tutorial-framework}" +IMAGE_NAME="${IMAGE_NAME:-test-tutorial-framework}" BACKEND_PORT="${BACKEND_PORT:-8888}" AVATAO_SECRET="${AVATAO_SECRET:-secret}" BUILD_CONTEXT="${BUILD_CONTEXT:-solvable}" @@ -21,6 +24,12 @@ function run_frontend() yarn start } +function build_baseimage() +{ + cd $BASEIMAGE_PATH + docker build -t $BASEIMAGE_NAME . +} + function run_backend() { cd $BACKEND_PATH @@ -30,5 +39,6 @@ function run_backend() trap 'exit' INT TERM trap 'kill 0' EXIT +build_baseimage run_frontend & run_backend wait