1
0
mirror of https://github.com/avatao-content/test-tutorial-framework synced 2024-11-14 04:07:18 +00:00

Update magic started to rebuild baseimage before the rest

This commit is contained in:
Kristóf Tóth 2018-03-25 16:03:13 +02:00
parent c182d67423
commit 30746b49e8

View File

@ -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