This commit is contained in:
Your Name 2025-04-21 14:54:33 +12:00
parent 0a2036cbd7
commit 50bd2e2446
13 changed files with 288 additions and 115 deletions

View File

@ -7,7 +7,7 @@ _dropshell_completions() {
prev="${COMP_WORDS[COMP_CWORD-1]}" prev="${COMP_WORDS[COMP_CWORD-1]}"
# List of main commands # List of main commands
opts="help version status servers templates autocomplete_list_servers autocomplete_list_services run install" opts="help version status servers templates autocomplete_list_servers autocomplete_list_services run install backup"
# If we're completing the first argument, show all commands # If we're completing the first argument, show all commands
if [[ ${COMP_CWORD} -eq 1 ]] ; then if [[ ${COMP_CWORD} -eq 1 ]] ; then
@ -37,15 +37,15 @@ _dropshell_completions() {
COMPREPLY=( $(compgen -W "${servers[*]}" -- ${cur}) ) COMPREPLY=( $(compgen -W "${servers[*]}" -- ${cur}) )
return 0 return 0
;; ;;
run|install) run|install|backup)
# First argument after run/install is server name # First argument after run/install/backup is server name
local servers=($(dropshell autocomplete_list_servers)) local servers=($(dropshell autocomplete_list_servers))
COMPREPLY=( $(compgen -W "${servers[*]}" -- ${cur}) ) COMPREPLY=( $(compgen -W "${servers[*]}" -- ${cur}) )
return 0 return 0
;; ;;
*) *)
# Handle completion for service names and commands after run/install # Handle completion for service names and commands after run/install/backup
if [[ ${COMP_CWORD} -ge 2 ]] && [[ "${COMP_WORDS[1]}" == "run" || "${COMP_WORDS[1]}" == "install" ]]; then if [[ ${COMP_CWORD} -ge 2 ]] && [[ "${COMP_WORDS[1]}" == "run" || "${COMP_WORDS[1]}" == "install" || "${COMP_WORDS[1]}" == "backup" ]]; then
if [[ ${COMP_CWORD} -eq 3 ]]; then if [[ ${COMP_CWORD} -eq 3 ]]; then
# Second argument is service name # Second argument is service name
local server_name="${COMP_WORDS[2]}" local server_name="${COMP_WORDS[2]}"

View File

@ -24,7 +24,9 @@ void print_help() {
std::cout << " servers List configured servers" << std::endl; std::cout << " servers List configured servers" << std::endl;
std::cout << " servers NAME Show details for specific server" << std::endl; std::cout << " servers NAME Show details for specific server" << std::endl;
std::cout << " templates List available templates" << std::endl; std::cout << " templates List available templates" << std::endl;
std::cout << " install SERVER SERVICE Install a service on a server" << std::endl; std::cout << std::endl;
std::cout << " install SERVER SERVICE (Re)install a service on a server." << std::endl;
std::cout << " backup SERVER SERVICE Backup a service on a server." << std::endl;
std::cout << " run SERVER SERVICE COMMAND Run a command on a specific service" << std::endl; std::cout << " run SERVER SERVICE COMMAND Run a command on a specific service" << std::endl;
std::cout << std::endl; std::cout << std::endl;
std::cout << "Examples:" << std::endl; std::cout << "Examples:" << std::endl;
@ -157,7 +159,28 @@ int main(int argc, char* argv[]) {
} }
if (!service.run_command(command)) { if (!service.run_command(command)) {
std::cerr << "Error: Failed to run command" << std::endl; std::cerr << command +" failed." << std::endl;
return 1;
}
return 0;
}
if (cmd == "backup") {
if (argc < 4) {
std::cerr << "Error: backup command requires server name and service name" << std::endl;
return 1;
}
std::string server_name = argv[2];
std::string service_name = argv[3];
dropshell::server_service service;
if (!service.init(server_name, service_name)) {
std::cerr << "Error: Failed to initialize service" << std::endl;
return 1;
}
if (!service.backup()) {
std::cerr << "Backup failed." << std::endl;
return 1; return 1;
} }
return 0; return 0;

View File

@ -9,6 +9,8 @@
#include <fstream> #include <fstream>
#include <sstream> #include <sstream>
#include <cstdlib> #include <cstdlib>
#include <chrono>
#include <iomanip>
namespace fs = boost::filesystem; namespace fs = boost::filesystem;
@ -106,12 +108,20 @@ bool server_service::install() {
return false; return false;
} }
// Copy template files // Check if rsync is installed on remote host
std::string scp_cmd = "scp -P " + m_server_env->get_SSH_PORT() + " -r " + std::string check_rsync_cmd = ssh_cmd.str() + "'which rsync > /dev/null 2>&1'";
info.path + "/* " + if (system(check_rsync_cmd.c_str()) != 0) {
std::cerr << "Error: rsync is not installed on the remote host" << std::endl;
return false;
}
// Copy template files, preserving the directory structure and file permissions
std::cout << "Copying template files from " << info.path << " to " << service_dir << "/template/" << std::endl;
std::string rsync_cmd = "rsync --delete -zrpc -e 'ssh -p " + m_server_env->get_SSH_PORT() + "' " +
info.path + "/ " +
m_server_env->get_SSH_USER() + "@" + m_server_env->get_SSH_HOST() + ":" + m_server_env->get_SSH_USER() + "@" + m_server_env->get_SSH_HOST() + ":" +
service_dir + "/template/"; service_dir + "/template/";
if (system(scp_cmd.c_str()) != 0) { if (system(rsync_cmd.c_str()) != 0) {
std::cerr << "Error: Failed to copy template files" << std::endl; std::cerr << "Error: Failed to copy template files" << std::endl;
return false; return false;
} }
@ -123,7 +133,7 @@ bool server_service::install() {
return false; return false;
} }
fs::path service_env = fs::path(user_dir) / "servers" / m_server_name / (m_service_name + ".env"); fs::path service_env = fs::path(user_dir) / "servers" / m_server_name / (m_service_name + ".env");
scp_cmd = "scp -P " + m_server_env->get_SSH_PORT() + " " + std::string scp_cmd = "scp -P " + m_server_env->get_SSH_PORT() + " " +
service_env.string() + " " + service_env.string() + " " +
m_server_env->get_SSH_USER() + "@" + m_server_env->get_SSH_HOST() + ":" + m_server_env->get_SSH_USER() + "@" + m_server_env->get_SSH_HOST() + ":" +
service_dir + "/" + m_service_name + ".env"; service_dir + "/" + m_service_name + ".env";
@ -133,8 +143,8 @@ bool server_service::install() {
} }
// Run install script // Run install script
std::string install_cmd = ssh_cmd.str() + "'cd " + service_dir + " && ./template/install.sh " + std::string install_cmd = ssh_cmd.str() + "'cd " + service_dir + "/template && /bin/bash install.sh " +
m_service_name + ".env'"; service_dir + "/" + m_service_name + ".env'";
if (system(install_cmd.c_str()) != 0) { if (system(install_cmd.c_str()) != 0) {
std::cerr << "Error: Failed to run install script" << std::endl; std::cerr << "Error: Failed to run install script" << std::endl;
return false; return false;
@ -155,6 +165,10 @@ bool server_service::run_command(const std::string& command) {
ssh_cmd << "ssh -p " << m_server_env->get_SSH_PORT() << " " ssh_cmd << "ssh -p " << m_server_env->get_SSH_PORT() << " "
<< m_server_env->get_SSH_USER() << "@" << m_server_env->get_SSH_HOST() << " "; << m_server_env->get_SSH_USER() << "@" << m_server_env->get_SSH_HOST() << " ";
std::string script_dir = service_dir + "/template";
std::string script_path_and_command = script_dir + "/" + command + ".sh";
std::string env_path = service_dir + "/" + m_service_name + ".env";
// Check if service directory exists // Check if service directory exists
std::string check_dir_cmd = ssh_cmd.str() + "'test -d " + service_dir + "'"; std::string check_dir_cmd = ssh_cmd.str() + "'test -d " + service_dir + "'";
if (system(check_dir_cmd.c_str()) != 0) { if (system(check_dir_cmd.c_str()) != 0) {
@ -163,28 +177,116 @@ bool server_service::run_command(const std::string& command) {
} }
// Check if command script exists // Check if command script exists
std::string check_script_cmd = ssh_cmd.str() + "'test -f " + service_dir + "/" + command + ".sh'"; std::string check_script_cmd = ssh_cmd.str() + "'test -f " + script_path_and_command + "'";
if (system(check_script_cmd.c_str()) != 0) { if (system(check_script_cmd.c_str()) != 0) {
std::cerr << "Error: Command script '" << command << ".sh' not found" << std::endl; std::cerr << "Error: Command script '" << command << ".sh' not found" << std::endl;
return false; return false;
} }
// Check if env file exists // Check if env file exists
std::string check_env_cmd = ssh_cmd.str() + "'test -f " + service_dir + "/" + m_service_name + ".env'"; std::string check_env_cmd = ssh_cmd.str() + "'test -f " + env_path + "'";
if (system(check_env_cmd.c_str()) != 0) { if (system(check_env_cmd.c_str()) != 0) {
std::cerr << "Error: Service environment file not found on server" << std::endl; std::cerr << "Error: Service environment file not found on server" << std::endl;
return false; return false;
} }
// Run the command // Run the command
std::string run_cmd = ssh_cmd.str() + "'cd " + service_dir + " && ./" + command + ".sh " + std::string run_cmd = ssh_cmd.str() + "'cd " + script_dir +
m_service_name + ".env'"; " && /bin/bash " + script_path_and_command + " "+ env_path + "'";
if (system(run_cmd.c_str()) != 0) { if (system(run_cmd.c_str()) != 0) {
std::cerr << "Error: Failed to run command" << std::endl; std::cerr << "Command returned error code: " << script_path_and_command << std::endl;
return false; return false;
} }
return true; return true;
} }
bool server_service::backup() {
if (!m_server_env) {
std::cerr << "Error: Server service not initialized" << std::endl;
return false;
}
// Check if service directory exists
std::string service_dir = m_server_env->get_DROPSHELL_DIR() + "/" + m_service_name;
std::stringstream ssh_cmd;
ssh_cmd << "ssh -p " << m_server_env->get_SSH_PORT() << " "
<< m_server_env->get_SSH_USER() << "@" << m_server_env->get_SSH_HOST() << " ";
std::string script_dir = service_dir + "/template";
std::string script_path = script_dir + "/backup.sh";
std::string env_path = service_dir + "/" + m_service_name + ".env";
// Check if service directory exists
std::string check_dir_cmd = ssh_cmd.str() + "'test -d " + service_dir + "'";
if (system(check_dir_cmd.c_str()) != 0) {
std::cerr << "Error: Service directory not found on server - has it been installed?" << std::endl;
return false;
}
// Check if backup script exists
std::string check_script_cmd = ssh_cmd.str() + "'test -f " + script_path + "'";
if (system(check_script_cmd.c_str()) != 0) {
std::cerr << "Error: Backup script not found" << std::endl;
return false;
}
// Check if env file exists
std::string check_env_cmd = ssh_cmd.str() + "'test -f " + env_path + "'";
if (system(check_env_cmd.c_str()) != 0) {
std::cerr << "Error: Service environment file not found on server" << std::endl;
return false;
}
// Create backups directory on server if it doesn't exist
std::string server_backups_dir = m_server_env->get_DROPSHELL_DIR() + "/backups";
std::string mkdir_cmd = ssh_cmd.str() + "'mkdir -p " + server_backups_dir + "'";
if (system(mkdir_cmd.c_str()) != 0) {
std::cerr << "Error: Failed to create backups directory on server" << std::endl;
return false;
}
// Create backups directory locally if it doesn't exist
std::string user_dir;
if (!get_user_directory(user_dir)) {
std::cerr << "Error: User directory not set" << std::endl;
return false;
}
fs::path local_backups_dir = fs::path(user_dir) / "backups";
if (!fs::exists(local_backups_dir)) {
fs::create_directories(local_backups_dir);
}
// Get current datetime for backup filename
auto now = std::chrono::system_clock::now();
auto time = std::chrono::system_clock::to_time_t(now);
std::stringstream datetime;
datetime << std::put_time(std::localtime(&time), "%Y-%m-%d_%H-%M-%S");
// Construct backup filename
std::string backup_filename = m_server_name + "-" + m_service_name + "-" + datetime.str() + ".tgz";
std::string server_backup_path = server_backups_dir + "/" + backup_filename;
std::string local_backup_path = (local_backups_dir / backup_filename).string();
// Run backup script
std::string backup_cmd = ssh_cmd.str() + "'cd " + script_dir +
" && /bin/bash backup.sh " + env_path + " " + server_backup_path + "'";
if (system(backup_cmd.c_str()) != 0) {
std::cerr << "Error: Backup script failed" << std::endl;
return false;
}
// Copy backup file from server to local
std::string scp_cmd = "scp -P " + m_server_env->get_SSH_PORT() + " " +
m_server_env->get_SSH_USER() + "@" + m_server_env->get_SSH_HOST() + ":" +
server_backup_path + " " + local_backup_path;
if (system(scp_cmd.c_str()) != 0) {
std::cerr << "Error: Failed to copy backup file from server" << std::endl;
return false;
}
std::cout << "Backup created successfully: " << local_backup_path << std::endl;
return true;
}
} // namespace dropshell } // namespace dropshell

View File

@ -37,6 +37,13 @@ class server_service {
// checking that the {service_name}.env file exists in the service directory. // checking that the {service_name}.env file exists in the service directory.
bool run_command(const std::string& command); bool run_command(const std::string& command);
// backup the service over ssh, using the credentials from _server.env (via server_env.hpp)
// 1. run backup.sh on the server
// 2. create a backup file with format server-service-datetime.tgz
// 3. store it in the server's DROPSHELL_DIR/backups folder
// 4. copy it to the local user_dir/backups folder
bool backup();
private: private:
std::string m_server_name; std::string m_server_name;
std::string m_service_name; std::string m_service_name;

View File

@ -1,5 +1,7 @@
#!/bin/bash #!/bin/bash
source _dockerhelper.sh
# Print error message and exit with code 1 # Print error message and exit with code 1
# Usage: die "error message" # Usage: die "error message"
die() { die() {
@ -44,47 +46,11 @@ grey_end() {
echo -e -n "\033[0m" echo -e -n "\033[0m"
} }
# Test if Docker is installed and working on the local machine create_and_start_container() {
# Returns 0 if Docker is working, 1 if there are any issues if _is_container_exists $CONTAINER_NAME; then
test_docker() { _is_container_running $CONTAINER_NAME && return 0
echo "Testing Docker on local machine..." _start_container $CONTAINER_NAME
# Test Docker installation
if ! command -v docker >/dev/null 2>&1; then
die "Docker is not installed on this machine"
fi
# Test Docker daemon is running
if ! docker info >/dev/null 2>&1; then
die "Docker daemon is not running"
fi
# Test Docker can run containers
if ! docker run --rm hello-world >/dev/null 2>&1; then
die "Docker cannot run containers"
fi
echo "Docker is working correctly on local machine"
return 0
}
start_container() {
# Check if container exists and is stopped
echo "Checking container status..."
if docker ps -a --format '{{.Names}}' | grep -q "^${CONTAINER_NAME}$"; then
if docker ps --format '{{.Names}}' | grep -q "^${CONTAINER_NAME}$"; then
die "Container ${CONTAINER_NAME} is already running"
else else
echo "Starting existing container ${CONTAINER_NAME}..."
grey_start
if ! docker start "${CONTAINER_NAME}"; then
die "Failed to start container ${CONTAINER_NAME}"
fi
grey_end
fi
else
echo "Creating and starting new container ${CONTAINER_NAME}..."
grey_start grey_start
docker run -d \ docker run -d \
--restart unless-stopped \ --restart unless-stopped \
@ -95,33 +61,11 @@ start_container() {
grey_end grey_end
fi fi
# check if the container is running if ! _is_container_running $CONTAINER_NAME; then
if ! docker ps --format '{{.Names}}' | grep -q "^${CONTAINER_NAME}$"; then die "Container ${CONTAINER_NAME} failed to start"
die "Container ${CONTAINER_NAME} is not running"
fi fi
# print the container id ID=$(_get_container_id $CONTAINER_NAME)
ID=$(docker ps --format '{{.ID}}' --filter "name=^${CONTAINER_NAME}$")
echo "Container ${CONTAINER_NAME} is running with ID ${ID}" echo "Container ${CONTAINER_NAME} is running with ID ${ID}"
return 0
}
stop_container() {
# Check if container is running
echo "Checking if container is running..."
if docker ps --format '{{.Names}}' | grep -q "^${CONTAINER_NAME}$"; then
echo "Stopping container ${CONTAINER_NAME}..."
grey_start
if ! docker stop "${CONTAINER_NAME}"; then
die "Failed to stop container ${CONTAINER_NAME}"
fi
grey_end
echo "Container ${CONTAINER_NAME} stopped successfully"
return 0
else
echo "Container ${CONTAINER_NAME} is not running"
return 1
fi
} }

View File

@ -0,0 +1,81 @@
# Routines for interacting with docker
# Check if docker is installed
_check_docker_installed() {
if ! command -v docker &> /dev/null; then
echo "Docker is not installed"
return 1
fi
# check if docker daemon is running
if ! docker info &> /dev/null; then
echo "Docker daemon is not running"
return 1
fi
# check if user has permission to run docker
if ! docker run --rm hello-world &> /dev/null; then
echo "User does not have permission to run docker"
return 1
fi
return 0
}
# Check if a container exists
_is_container_exists() {
if ! docker ps -a --format "{{.Names}}" | grep -q "^$1$"; then
return 1
fi
return 0
}
# Check if a container is running
_is_container_running() {
if ! docker ps --format "{{.Names}}" | grep -q "^$1$"; then
return 1
fi
return 0
}
# get contianer ID
_get_container_id() {
docker ps --format "{{.ID}}" --filter "name=$1"
}
# get container status
_get_container_status() {
docker ps --format "{{.Status}}" --filter "name=$1"
}
# start container that exists
_start_container() {
_is_container_exists $1 || return 1
_is_container_running $1 && return 0
docker start $1
}
# stop container that exists
_stop_container() {
_is_container_running $1 || return 0;
docker stop $1
}
# remove container that exists
_remove_container() {
_stop_container $1
_is_container_exists $1 || return 0;
docker rm $1
}
# get container logs
_get_container_logs() {
if ! _is_container_exists $1; then
echo "Container $1 does not exist"
return 1
fi
docker logs $1
}

View File

@ -1,24 +1,34 @@
#!/bin/bash #!/bin/bash
# Source common functions # Source common functions
source "$(dirname "$0")/_dockerhelper.sh"
source "$(dirname "$0")/_common.sh" source "$(dirname "$0")/_common.sh"
# Load environment variables # Load environment variables
load_env "$1" || die "Failed to load environment variables" load_env "$1" || die "Failed to load environment variables"
# set the backup file name to be the current date and time # Get backup file path from second argument
BACKUP_FILE="$BACKUP_FOLDER/backup-squashkiwi-$(date +%Y-%m-%d_%H-%M-%S).tar.gz" BACKUP_FILE="$2"
if [ -z "$BACKUP_FILE" ]; then
if [ -f "$BACKUP_FILE" ]; then die "Backup file path not provided"
echo "Backup file $BACKUP_FILE already exists"
exit 1
fi fi
stop_container # Check if backup file already exists
if [ -f "$BACKUP_FILE" ]; then
die "Backup file $BACKUP_FILE already exists"
fi
# create the backup file, using relative paths. # Stop container before backup
tar zcvf "$BACKUP_FILE" -C "$DATA_FOLDER" . || die "Failed to create backup" _stop_container "$CONTAINER_NAME"
start_container # Create backup of data folder
echo "Creating backup of $DATA_FOLDER..."
if ! tar zcvf "$BACKUP_FILE" -C "$DATA_FOLDER" .; then
_start_container "$CONTAINER_NAME"
die "Failed to create backup"
fi
echo "Backup created in $BACKUP_FILE" # Start container after backup
_start_container "$CONTAINER_NAME"
echo "Backup created successfully: $BACKUP_FILE"

View File

@ -9,7 +9,6 @@ HOST_PORT=80
# Deployment settings # Deployment settings
DEPLOY_FOLDER="${HOME}/sk/deploy" DEPLOY_FOLDER="${HOME}/sk/deploy"
DATA_FOLDER="${HOME}/sk/data" DATA_FOLDER="${HOME}/sk/data"
BACKUP_FOLDER="${HOME}/sk/backups"
CONTAINER_NAME="squashkiwi" CONTAINER_NAME="squashkiwi"
# Image settings # Image settings

View File

@ -1,19 +1,18 @@
#!/bin/bash #!/bin/bash
# Source common functions # Source common functions
source "$(dirname "$0")/_dockerhelper.sh"
source "$(dirname "$0")/_common.sh" source "$(dirname "$0")/_common.sh"
# Load environment variables # Load environment variables
load_env "$1" || exit 1 load_env "$1" || exit 1
# Test Docker # Test Docker
if ! test_docker; then if ! _check_docker_installed; then
echo "Docker test failed, aborting installation..." echo "Docker test failed, aborting installation..."
exit 1 exit 1
fi fi
# Rest of your install script here
function create_folder() { function create_folder() {
local folder="$1" local folder="$1"
if ! mkdir -p "$folder"; then if ! mkdir -p "$folder"; then
@ -34,3 +33,8 @@ if ! docker pull "$IMAGE_REGISTRY/$IMAGE_REPO:$IMAGE_TAG"; then
fi fi
echo "Successfully pulled the docker image from the registry" echo "Successfully pulled the docker image from the registry"
# start the container
_stop_container $CONTAINER_NAME
create_and_start_container || die "Failed to start container ${CONTAINER_NAME}"
echo "Installation complete"

View File

@ -1,12 +1,13 @@
#!/bin/bash #!/bin/bash
# Source common functions # Source common functions
source "$(dirname "$0")/_dockerhelper.sh"
source "$(dirname "$0")/_common.sh" source "$(dirname "$0")/_common.sh"
# Load environment variables # Load environment variables
load_env "$1" || die "Failed to load environment variables" load_env "$1" || die "Failed to load environment variables"
start_container || die "Failed to start container ${CONTAINER_NAME}" create_and_start_container || die "Failed to start container ${CONTAINER_NAME}"
grey_start grey_start
docker logs --tail 20 "${CONTAINER_NAME}" docker logs --tail 20 "${CONTAINER_NAME}"

View File

@ -1,24 +1,23 @@
#!/bin/bash #!/bin/bash
# Source common functions # Source common functions
source "$(dirname "$0")/_dockerhelper.sh"
source "$(dirname "$0")/_common.sh" source "$(dirname "$0")/_common.sh"
# Load environment variables # Load environment variables
load_env "$1" || exit 1 load_env "$1" || exit 1
# check if the service is running # check if the service is running
if ! docker ps | grep -q "$CONTAINER_NAME"; then if ! _is_container_running $CONTAINER_NAME; then
echo "Service is not running" echo "Service is not running - did not find container $CONTAINER_NAME."
exit 1 exit 1
fi fi
echo "Service is running"
# curl -s -X GET http://localhost:8080/health | grep -q "OK" # curl -s -X GET http://localhost:8080/health | grep -q "OK"
if ! curl -s -X GET http://localhost:${HOST_PORT}/health | grep -q "OK"; then if ! curl -s -X GET http://localhost:${HOST_PORT}/health | grep -q "OK"; then
echo "Service is not healthy" echo "Service is not healthy - did not get OK response from /health endpoint."
exit 1 exit 1
fi fi
echo "Service is healthy" echo "Service is healthy"
return 0 exit 0

View File

@ -1,12 +1,13 @@
#!/bin/bash #!/bin/bash
# Source common functions # Source common functions
source "$(dirname "$0")/_dockerhelper.sh"
source "$(dirname "$0")/_common.sh" source "$(dirname "$0")/_common.sh"
# Load environment variables # Load environment variables
load_env "$1" || die "Failed to load environment variables" load_env "$1" || die "Failed to load environment variables"
stop_container || die "Failed to stop container ${CONTAINER_NAME}" _stop_container $CONTAINER_NAME || die "Failed to stop container ${CONTAINER_NAME}"
grey_start grey_start
docker logs --tail 20 "${CONTAINER_NAME}" docker logs --tail 20 "${CONTAINER_NAME}"

View File

@ -1,6 +1,7 @@
#!/bin/bash #!/bin/bash
# Source common functions # Source common functions
source "$(dirname "$0")/_dockerhelper.sh"
source "$(dirname "$0")/_common.sh" source "$(dirname "$0")/_common.sh"
# Load environment variables # Load environment variables
@ -14,7 +15,7 @@ fi
echo "Successfully pulled the docker image from the registry" echo "Successfully pulled the docker image from the registry"
# stop the old container # stop the old container
stop_container _stop_container ${CONTAINER_NAME}
# remove the old container # remove the old container
grey_start grey_start
@ -26,5 +27,6 @@ grey_end
echo "Successfully removed the old container" echo "Successfully removed the old container"
# start the new container # start the new container
start_container create_and_start_container || die "Failed to start container ${CONTAINER_NAME}"