mirror of
				https://github.com/avatao-content/baseimage-tutorial-framework
				synced 2025-11-04 01:02:54 +00:00 
			
		
		
		
	Improve magic startup script
This commit is contained in:
		@@ -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
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user