.
This commit is contained in:
36
templates/squashkiwi/install.sh
Executable file
36
templates/squashkiwi/install.sh
Executable file
@ -0,0 +1,36 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Source common functions
|
||||
source "$(dirname "$0")/_common.sh"
|
||||
|
||||
# Load environment variables
|
||||
load_env "$1" || exit 1
|
||||
|
||||
# Test Docker
|
||||
if ! test_docker; then
|
||||
echo "Docker test failed, aborting installation..."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Rest of your install script here
|
||||
|
||||
function create_folder() {
|
||||
local folder="$1"
|
||||
if ! mkdir -p "$folder"; then
|
||||
die "Failed to create folder: $folder"
|
||||
fi
|
||||
}
|
||||
|
||||
# Create deploy and data folders
|
||||
echo "Ensuring deployment folders exist..."
|
||||
create_folder "$DEPLOY_FOLDER"
|
||||
create_folder "$DATA_FOLDER"
|
||||
create_folder "$BACKUP_FOLDER"
|
||||
|
||||
# check can pull image on remote host and exit if fails
|
||||
if ! docker pull "$IMAGE_REGISTRY/$IMAGE_REPO:$IMAGE_TAG"; then
|
||||
echo "Failed to pull image $IMAGE_REGISTRY/$IMAGE_REPO:$IMAGE_TAG"
|
||||
exit 1
|
||||
fi
|
||||
echo "Successfully pulled the docker image from the registry"
|
||||
|
Reference in New Issue
Block a user