mirror of
https://github.com/avatao-content/baseimage-tutorial-framework
synced 2024-12-23 07:31:57 +00:00
Improve magic startup script
This commit is contained in:
parent
8a80797d14
commit
cbf2caa4c3
@ -1,6 +1,8 @@
|
||||
#!/usr/bin/env bash
|
||||
set -e
|
||||
|
||||
[ -z $TAO_PATH ] && echo 'You need to set the "TAO_PATH" envvar to the directory where the TFW repos are cloned!' && exit 1
|
||||
|
||||
BACKEND_REPO="${BACKEND_REPO:-tutorial-framework-wip}"
|
||||
FRONTEND_REPO="${FRONTEND_REPO:-tutorial-framework-ng}"
|
||||
BACKEND_PATH="${TAO_PATH}/${BACKEND_REPO}"
|
||||
@ -23,6 +25,7 @@ function run_backend()
|
||||
docker run --rm -p $BACKEND_PORT:$BACKEND_PORT -e AVATAO_SECRET=$AVATAO_SECRET $IMAGE_NAME
|
||||
}
|
||||
|
||||
trap 'kill %1; kill %2' SIGINT
|
||||
trap 'exit' INT TERM
|
||||
trap 'kill 0' EXIT
|
||||
run_frontend & run_backend
|
||||
|
||||
wait
|
||||
|
Loading…
Reference in New Issue
Block a user