mirror of
https://github.com/avatao-content/baseimage-tutorial-framework
synced 2024-11-22 21:01:31 +00:00
Update magic starter to support new baseimage
This commit is contained in:
parent
82fb01e42e
commit
7c9ffde932
@ -5,14 +5,15 @@ set -e
|
|||||||
SCRIPT_DIR="$(dirname $($readlink_cmd -f $0))"
|
SCRIPT_DIR="$(dirname $($readlink_cmd -f $0))"
|
||||||
|
|
||||||
TAO_PATH="${TAO_PATH:-$SCRIPT_DIR/..}"
|
TAO_PATH="${TAO_PATH:-$SCRIPT_DIR/..}"
|
||||||
BACKEND_REPO="${BACKEND_REPO:-tutorial-framework-wip}"
|
BACKEND_REPO="${BACKEND_REPO:-test-tutorial-framework}"
|
||||||
FRONTEND_REPO="${FRONTEND_REPO:-tutorial-framework-ng}"
|
FRONTEND_REPO="${FRONTEND_REPO:-frontend-tutorial-framework}"
|
||||||
BACKEND_PATH="${TAO_PATH}/${BACKEND_REPO}"
|
BACKEND_PATH="${TAO_PATH}/${BACKEND_REPO}"
|
||||||
FRONTEND_PATH="${TAO_PATH}/${FRONTEND_REPO}"
|
FRONTEND_PATH="${TAO_PATH}/${FRONTEND_REPO}"
|
||||||
|
|
||||||
IMAGE_NAME="${IMAGE_NAME:-tfw}"
|
IMAGE_NAME="${IMAGE_NAME:-baseimage-tutorial-framework}"
|
||||||
BACKEND_PORT="${BACKEND_PORT:-8888}"
|
BACKEND_PORT="${BACKEND_PORT:-8888}"
|
||||||
AVATAO_SECRET="${AVATAO_SECRET:-secret}"
|
AVATAO_SECRET="${AVATAO_SECRET:-secret}"
|
||||||
|
BUILD_CONTEXT="${BUILD_CONTEXT:-solvable}"
|
||||||
|
|
||||||
function run_frontend()
|
function run_frontend()
|
||||||
{
|
{
|
||||||
@ -23,7 +24,7 @@ function run_frontend()
|
|||||||
function run_backend()
|
function run_backend()
|
||||||
{
|
{
|
||||||
cd $BACKEND_PATH
|
cd $BACKEND_PATH
|
||||||
docker build -t $IMAGE_NAME .
|
docker build -t $IMAGE_NAME -f ${BUILD_CONTEXT}/Dockerfile --build-arg BUILD_CONTEXT=$BUILD_CONTEXT --build-arg NOFRONTEND=1 .
|
||||||
docker run --rm -p $BACKEND_PORT:$BACKEND_PORT -e AVATAO_SECRET=$AVATAO_SECRET $IMAGE_NAME
|
docker run --rm -p $BACKEND_PORT:$BACKEND_PORT -e AVATAO_SECRET=$AVATAO_SECRET $IMAGE_NAME
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user