1
0
mirror of https://github.com/avatao-content/test-tutorial-framework synced 2024-11-14 15:57:17 +00:00

Improve HOTRELOAD mounting logic

This commit is contained in:
Kristóf Tóth 2018-05-14 12:45:21 +02:00
parent 3ee5db6e57
commit fb2814c3a2

View File

@ -92,13 +92,14 @@ build_test_withfrontend()
run_test()
{
cd "$TAO_PATH"
mount_baseimage="-v ${BASEIMAGE_PATH}/lib/tfw:/usr/local/lib/tfw"
mount_test="-v $TEST_PATH/solvable/src:/srv/.tfw"
mount_volumes=""
[ "${HOTRELOAD:-0}" == "1" ] && mount_volumes="${mount_baseimage} ${mount_test}"
if [ "${HOTRELOAD:-0}" == "1" ]; then
[ -d "$BASEIMAGE_PATH" ] && mount_baseimage="-v ${BASEIMAGE_PATH}/lib/tfw:/usr/local/lib/tfw"
mount_test="-v ${TEST_PATH}/solvable/src:/srv/.tfw"
mount_volumes="${mount_baseimage:-} ${mount_test}"
fi
docker run --rm \
-p $TEST_PORT:$TEST_PORT \
${mount_volumes} \
${mount_volumes:-} \
${@:-} \
-e AVATAO_SECRET=$AVATAO_SECRET $IMAGE_NAME
}