I am trying to set up a Load Balancer on GCP which deploys new VMs with a copy of my application when the health check fails. Is using the startup script a safe solution for deploying copies of my application on the VM?
My thought is to host a zipped copy of my application and store it on a remote server and retrieve and unzip it on each new VM as it's deployed.
#! /bin/bash
apt update
apt upgrade -y
apt install -y php apache2 unzip
curl https://example.com/application.zip -L -o /var/www/html/application.zip
unzip /var/www/html/application.zip