mirror of
				https://github.com/avatao-content/test-tutorial-framework
				synced 2025-11-04 05:12:54 +00:00 
			
		
		
		
	Improve HOTRELOAD mounting logic
This commit is contained in:
		
							
								
								
									
										11
									
								
								hack/tfw.sh
									
									
									
									
									
								
							
							
						
						
									
										11
									
								
								hack/tfw.sh
									
									
									
									
									
								
							@@ -92,13 +92,14 @@ build_test_withfrontend()
 | 
				
			|||||||
run_test()
 | 
					run_test()
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    cd "$TAO_PATH"
 | 
					    cd "$TAO_PATH"
 | 
				
			||||||
    mount_baseimage="-v ${BASEIMAGE_PATH}/lib/tfw:/usr/local/lib/tfw"
 | 
					    if [ "${HOTRELOAD:-0}" == "1" ]; then
 | 
				
			||||||
    mount_test="-v $TEST_PATH/solvable/src:/srv/.tfw"
 | 
					        [ -d "$BASEIMAGE_PATH" ] && mount_baseimage="-v ${BASEIMAGE_PATH}/lib/tfw:/usr/local/lib/tfw"
 | 
				
			||||||
    mount_volumes=""
 | 
					        mount_test="-v ${TEST_PATH}/solvable/src:/srv/.tfw"
 | 
				
			||||||
    [ "${HOTRELOAD:-0}" == "1" ] && mount_volumes="${mount_baseimage} ${mount_test}"
 | 
					        mount_volumes="${mount_baseimage:-} ${mount_test}"
 | 
				
			||||||
 | 
					    fi
 | 
				
			||||||
    docker run --rm                                          \
 | 
					    docker run --rm                                          \
 | 
				
			||||||
               -p $TEST_PORT:$TEST_PORT                      \
 | 
					               -p $TEST_PORT:$TEST_PORT                      \
 | 
				
			||||||
               ${mount_volumes}                              \
 | 
					               ${mount_volumes:-}                            \
 | 
				
			||||||
               ${@:-}                                        \
 | 
					               ${@:-}                                        \
 | 
				
			||||||
               -e AVATAO_SECRET=$AVATAO_SECRET $IMAGE_NAME
 | 
					               -e AVATAO_SECRET=$AVATAO_SECRET $IMAGE_NAME
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user