How to deploy WellNuo mobile react app? #12
Loading…
x
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
cd ~
./deploy_well_mob.sh
#!/bin/bash
Deploy Well Mob PWA Script
Usage: ./deploy_well_mob.sh [log_identifier]
set -e # Exit on any error
Configuration
git_repo="https://github.com/zmrzli/well_mob_pwa.git"
local_repo_dir="$HOME/well_mob_pwa"
deploy_dir="/home/ubuntu/server-setup/well_mob_pwa"
server_setup_dir="$HOME/server-setup"
Color codes for output
RED='\033[0;31m'
GREEN='\033[0;92m'
YELLOW='\033[1;33m'
NC='\033[0m' # No Color
Logging function
log() {
echo -e "${GREEN}[$(date '+%Y-%m-%d %H:%M:%S')] $1${NC}"
}
error() {
echo -e "${RED}[ERROR] $1${NC}" >&2
}
warning() {
echo -e "${YELLOW}[WARNING] $1${NC}"
}
Execute command with logging
exeLog() {
local cmd="$1"
local display_cmd="${2:-$1}"
}
Package check and install function
pkgChk() {
local packages="$1"
log "Checking/installing packages: $packages"
}
Main deployment function
deploy_well_mob() {
log "Starting Well Mob PWA deployment..."
}
Check if script is being sourced or executed
if ; then
# Script is being executed directly
deploy_well_mob "$@"
else
# Script is being sourced
log "Script sourced. Call deploy_well_mob function to run deployment."
fi