Update install.sh
This commit is contained in:
+14
-2
@@ -12,16 +12,28 @@ install()
|
||||
port=$(aiur network/get_port)
|
||||
fi
|
||||
echo "Installing $app_name... to port $port"
|
||||
|
||||
|
||||
# Install prerequisites
|
||||
aiur install/dotnet
|
||||
aiur install/node
|
||||
|
||||
# Clone the repo
|
||||
aiur git/clone_to $repo_path /tmp/repo
|
||||
|
||||
npm install --prefix "/tmp/repo/src/Aiursoft.ChessServer/wwwroot/"
|
||||
# Install node modules
|
||||
wwwrootPath=$(dirname "/tmp/repo/$proj_path")/wwwroot
|
||||
if [ -d "$wwwrootPath" ]; then
|
||||
echo "Found wwwroot folder $wwwrootPath, will install node modules."
|
||||
sudo npm install --prefix "$wwwrootPath" -force
|
||||
fi
|
||||
|
||||
# Publish the app
|
||||
aiur dotnet/publish "/tmp/repo/$proj_path" "/opt/apps/$app_name"
|
||||
|
||||
# Register the service
|
||||
aiur services/register_aspnet_service $app_name $port "/opt/apps/$app_name" $dll_name
|
||||
|
||||
# Clean up
|
||||
echo "Install $app_name finished! Please open http://$(hostname):$port to try!"
|
||||
sudo rm /tmp/repo -rf
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user