Project NOMAD is an offline-first knowledge and education server. Wikipedia, thousands of books, courses, maps, and optional local AI, all running on hardware you own with no internet required.
TypeScript
ops: added a check for docker-compose version in Nomad utility scripts
Jake Turner6934e8b4d1d8
diff --git a/install/install_nomad.sh b/install/install_nomad.shindex 4a15d76f..62e79bc8 100644--- a/install/install_nomad.sh+++ b/install/install_nomad.sh@@ -199,6 +199,16 @@ ensure_docker_installed() {fi}+check_docker_compose() {+ # Check if 'docker compose' (v2 plugin) is available+ if ! docker compose version &>/dev/null; then+ echo -e "${RED}#${RESET} Docker Compose v2 is not installed or not available as a Docker plugin."+ echo -e "${YELLOW}#${RESET} This script requires 'docker compose' (v2), not 'docker-compose' (v1)."+ echo -e "${YELLOW}#${RESET} Please read the Docker documentation at https://docs.docker.com/compose/install/ for instructions on how to install Docker Compose v2."+ exit 1+ fi+}+setup_nvidia_container_toolkit() {# This function attempts to set up NVIDIA GPU support but is non-blocking# Any failures will result in warnings but will NOT stop the installation process@@ -550,6 +560,7 @@ check_is_debug_modeget_install_confirmationaccept_termsensure_docker_installed+check_docker_composesetup_nvidia_container_toolkitget_local_ipcreate_nomad_directorydiff --git a/install/uninstall_nomad.sh b/install/uninstall_nomad.shindex 1ddf1066..be48931a 100644--- a/install/uninstall_nomad.sh+++ b/install/uninstall_nomad.sh@@ -75,6 +75,16 @@ ensure_docker_installed() {fi}+check_docker_compose() {+ # Check if 'docker compose' (v2 plugin) is available+ if ! docker compose version &>/dev/null; then+ echo -e "${RED}#${RESET} Docker Compose v2 is not installed or not available as a Docker plugin."+ echo -e "${YELLOW}#${RESET} This script requires 'docker compose' (v2), not 'docker-compose' (v1)."+ echo -e "${YELLOW}#${RESET} Please read the Docker documentation at https://docs.docker.com/compose/install/ for instructions on how to install Docker Compose v2."+ exit 1+ fi+}+storage_cleanup() {read -p "Do you want to delete the Project N.O.M.A.D. storage directory (${NOMAD_DIR})? This is best if you want to start a completely fresh install. This will PERMANENTLY DELETE all stored Nomad data and can't be undone! (y/N): " delete_dir_choicecase "$delete_dir_choice" in@@ -130,5 +140,6 @@ check_has_sudocheck_current_directoryensure_management_compose_file_existsensure_docker_installed+check_docker_composeget_uninstall_confirmationuninstall_nomad\ No newline at end of filediff --git a/install/update_nomad.sh b/install/update_nomad.shindex d7be2d54..4e355287 100644--- a/install/update_nomad.sh+++ b/install/update_nomad.sh@@ -94,6 +94,16 @@ ensure_docker_installed_and_running() {fi}+check_docker_compose() {+ # Check if 'docker compose' (v2 plugin) is available+ if ! docker compose version &>/dev/null; then+ echo -e "${RED}#${RESET} Docker Compose v2 is not installed or not available as a Docker plugin."+ echo -e "${YELLOW}#${RESET} This script requires 'docker compose' (v2), not 'docker-compose' (v1)."+ echo -e "${YELLOW}#${RESET} Please read the Docker documentation at https://docs.docker.com/compose/install/ for instructions on how to install Docker Compose v2."+ exit 1+ fi+}+ensure_docker_compose_file_exists() {if [ ! -f "/opt/project-nomad/compose.yml" ]; thenecho -e "${RED}#${RESET} compose.yml file not found. Please ensure it exists at /opt/project-nomad/compose.yml."@@ -145,6 +155,7 @@ check_has_sudo# Main updateget_update_confirmationensure_docker_installed_and_running+check_docker_composeensure_docker_compose_file_existsforce_recreateget_local_ip