#!/bin/bash # Check if a value was provided if [ -z "$1" ]; then echo "Usage: $0 " exit 1 fi # Use the provided argument VALUE="$1" TARGET_DIR="/home/geezo/docker_containers/$VALUE" # Check if the directory exists if [ ! -d "$TARGET_DIR" ]; then echo "Error: Directory $TARGET_DIR does not exist." exit 1 fi # Pull the latest changes from the repository cd /home/geezo/docker_containers/ git pull # Navigate to the target directory cd "$TARGET_DIR" || { echo "Failed to change directory to $TARGET_DIR"; exit 1; } # Run Docker Compose commands docker compose down docker compose up -d