| 
														
															@@ -38,56 +38,67 @@ handleServices() 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     fi 
														 | 
														
														 | 
														
															     fi 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 } 
														 | 
														
														 | 
														
															 } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+dockerCommand() 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+{ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    validCommands=(start stop restart build ps) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    if [[ ${validCommands[*]} =~ (^|[[:space:]])"$2"($|[[:space:]]) ]]; then 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        servicesString=$(handleServices "${@:3}") 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        if [[ ${servicesString:0:1} == 1 ]]; then 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            if [[ ${servicesString:2:4} == "all" ]]; then 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                servicesString="" 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            else 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                servicesString=${servicesString:2} 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            fi 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            if [[ ${2} == "stop" || ${2} == "restart" ]]; then 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                # shellcheck disable=SC2086 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                docker-compose stop ${servicesString} 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            fi 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            if [[ ${2} == "start" || ${2} == "restart" ]]; then 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                # shellcheck disable=SC2086 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                docker-compose up -d ${servicesString} 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            fi 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            if [[ ${2} == "build" || ${2} == "ps" ]]; then 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                # shellcheck disable=SC2086 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                docker-compose "${2}" ${servicesString} 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            fi 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        else 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            echo -e "${RED}${servicesString:2}\n${YELLOW}Usage: ${1} restart [backend, frontend, mongo, redis]${NC}" 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        fi 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    else 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        echo -e "${RED}Error: Invalid dockerCommand input${NC}" 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    fi 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+} 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 if [[ -x "$(command -v docker)" && -x "$(command -v docker-compose)" ]]; then 
														 | 
														
														 | 
														
															 if [[ -x "$(command -v docker)" && -x "$(command -v docker-compose)" ]]; then 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     case $1 in 
														 | 
														
														 | 
														
															     case $1 in 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     start) 
														 | 
														
														 | 
														
															     start) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         echo -e "${CYAN}Musare | Start Services${NC}" 
														 | 
														
														 | 
														
															         echo -e "${CYAN}Musare | Start Services${NC}" 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-        servicesString=$(handleServices "${@:2}") 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-        if [[ ${servicesString:0:1} == 1 && ${servicesString:2:4} == "all" ]]; then 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-            docker-compose up -d 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-        elif [[ ${servicesString:0:1} == 1 ]]; then 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-            docker-compose up -d ${servicesString:2} 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-        else 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-            echo -e "${RED}${servicesString:2}\n${YELLOW}Usage: $(basename "$0") start [backend, frontend, mongo, redis]${NC}" 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-        fi 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        # shellcheck disable=SC2068 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        dockerCommand "$(basename "$0")" start ${@:2} 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         ;; 
														 | 
														
														 | 
														
															         ;; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															     stop) 
														 | 
														
														 | 
														
															     stop) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         echo -e "${CYAN}Musare | Stop Services${NC}" 
														 | 
														
														 | 
														
															         echo -e "${CYAN}Musare | Stop Services${NC}" 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-        servicesString=$(handleServices "${@:2}") 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-        if [[ ${servicesString:0:1} == 1 && ${servicesString:2:4} == "all" ]]; then 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-            docker-compose stop 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-        elif [[ ${servicesString:0:1} == 1 ]]; then 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-            docker-compose stop ${servicesString:2} 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-        else 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-            echo -e "${RED}${servicesString:2}\n${YELLOW}Usage: $(basename "$0") stop [backend, frontend, mongo, redis]${NC}" 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-        fi 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        # shellcheck disable=SC2068 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        dockerCommand "$(basename "$0")" stop ${@:2} 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         ;; 
														 | 
														
														 | 
														
															         ;; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															     restart) 
														 | 
														
														 | 
														
															     restart) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         echo -e "${CYAN}Musare | Restart Services${NC}" 
														 | 
														
														 | 
														
															         echo -e "${CYAN}Musare | Restart Services${NC}" 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-        servicesString=$(handleServices "${@:2}") 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-        if [[ ${servicesString:0:1} == 1 && ${servicesString:2:4} == "all" ]]; then 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-            docker-compose stop 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-            docker-compose up -d 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-        elif [[ ${servicesString:0:1} == 1 ]]; then 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-            docker-compose stop ${servicesString:2} 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-            docker-compose up -d ${servicesString:2} 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-        else 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-            echo -e "${RED}${servicesString:2}\n${YELLOW}Usage: $(basename "$0") restart [backend, frontend, mongo, redis]${NC}" 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-        fi 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        # shellcheck disable=SC2068 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        dockerCommand "$(basename "$0")" restart ${@:2} 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         ;; 
														 | 
														
														 | 
														
															         ;; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															     build) 
														 | 
														
														 | 
														
															     build) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         echo -e "${CYAN}Musare | Build Services${NC}" 
														 | 
														
														 | 
														
															         echo -e "${CYAN}Musare | Build Services${NC}" 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-        servicesString=$(handleServices "${@:2}") 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-        if [[ ${servicesString:0:1} == 1 && ${servicesString:2:4} == "all" ]]; then 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-            docker-compose build 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-        elif [[ ${servicesString:0:1} == 1 ]]; then 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-            docker-compose build ${servicesString:2} 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-        else 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-            echo -e "${RED}${servicesString:2}\n${YELLOW}Usage: $(basename "$0") build [backend, frontend, mongo, redis]${NC}" 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-        fi 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        # shellcheck disable=SC2068 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        dockerCommand "$(basename "$0")" build ${@:2} 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        ;; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    status) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        echo -e "${CYAN}Musare | Service Status${NC}" 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        # shellcheck disable=SC2068 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        dockerCommand "$(basename "$0")" ps ${@:2} 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         ;; 
														 | 
														
														 | 
														
															         ;; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															     reset) 
														 | 
														
														 | 
														
															     reset) 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -109,10 +120,12 @@ if [[ -x "$(command -v docker)" && -x "$(command -v docker-compose)" ]]; then 
														 | 
													
												
											
												
													
														| 
														 | 
														
															                 echo -e "${RED}Cancelled reset${NC}" 
														 | 
														
														 | 
														
															                 echo -e "${RED}Cancelled reset${NC}" 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             fi 
														 | 
														
														 | 
														
															             fi 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         elif [[ ${servicesString:0:1} == 1 ]]; then 
														 | 
														
														 | 
														
															         elif [[ ${servicesString:0:1} == 1 ]]; then 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-            echo -e "${GREEN}Are you sure you want to reset all data for $(echo ${servicesString:2} | tr ' ' ',')? ${YELLOW}[y,n]: ${NC}" 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            echo -e "${GREEN}Are you sure you want to reset all data for $(echo "${servicesString:2}" | tr ' ' ',')? ${YELLOW}[y,n]: ${NC}" 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             read -r confirm 
														 | 
														
														 | 
														
															             read -r confirm 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             if [[ "${confirm}" == y* ]]; then 
														 | 
														
														 | 
														
															             if [[ "${confirm}" == y* ]]; then 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                # shellcheck disable=SC2086 
														 | 
													
												
											
												
													
														| 
														 | 
														
															                 docker-compose stop ${servicesString:2} 
														 | 
														
														 | 
														
															                 docker-compose stop ${servicesString:2} 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                # shellcheck disable=SC2086 
														 | 
													
												
											
												
													
														| 
														 | 
														
															                 docker-compose rm -v --force ${servicesString:2} 
														 | 
														
														 | 
														
															                 docker-compose rm -v --force ${servicesString:2} 
														 | 
													
												
											
												
													
														| 
														 | 
														
															                 if [[ "${servicesString:2}" == *redis* && -d ".redis" ]]; then 
														 | 
														
														 | 
														
															                 if [[ "${servicesString:2}" == *redis* && -d ".redis" ]]; then 
														 | 
													
												
											
												
													
														| 
														 | 
														
															                     rm -rf .redis 
														 | 
														
														 | 
														
															                     rm -rf .redis 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -146,7 +159,7 @@ if [[ -x "$(command -v docker)" && -x "$(command -v docker-compose)" ]]; then 
														 | 
													
												
											
												
													
														| 
														 | 
														
															                     echo -e "${RED}Error: Mongo offline, please start to attach.${NC}" 
														 | 
														
														 | 
														
															                     echo -e "${RED}Error: Mongo offline, please start to attach.${NC}" 
														 | 
													
												
											
												
													
														| 
														 | 
														
															                 else 
														 | 
														
														 | 
														
															                 else 
														 | 
													
												
											
												
													
														| 
														 | 
														
															                     echo -e "${YELLOW}Detach with CTRL+C${NC}" 
														 | 
														
														 | 
														
															                     echo -e "${YELLOW}Detach with CTRL+C${NC}" 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-                    docker-compose exec mongo mongo musare -u ${MONGO_USER_USERNAME} -p ${MONGO_USER_PASSWORD} 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                    docker-compose exec mongo mongo musare -u "${MONGO_USER_USERNAME}" -p "${MONGO_USER_PASSWORD}" 
														 | 
													
												
											
												
													
														| 
														 | 
														
															                 fi 
														 | 
														
														 | 
														
															                 fi 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             else 
														 | 
														
														 | 
														
															             else 
														 | 
													
												
											
												
													
														| 
														 | 
														
															                 echo -e "${RED}Error: .env does not exist${NC}" 
														 | 
														
														 | 
														
															                 echo -e "${RED}Error: .env does not exist${NC}" 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -221,12 +234,22 @@ if [[ -x "$(command -v docker)" && -x "$(command -v docker-compose)" ]]; then 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         if [[ -f .env ]]; then 
														 | 
														
														 | 
														
															         if [[ -f .env ]]; then 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             # shellcheck disable=SC1091 
														 | 
														
														 | 
														
															             # shellcheck disable=SC1091 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             source .env 
														 | 
														
														 | 
														
															             source .env 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-            if [[ ! -d "${scriptLocation%x}/backups" ]]; then 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-                echo -e "${YELLOW}Creating backup directory at ${scriptLocation%x}/backups${NC}" 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-                mkdir "${scriptLocation%x}/backups" 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            if [[ -z "${BACKUP_LOCATION}" ]]; then 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                backupLocation="${scriptLocation%x}/backups" 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            else 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                backupLocation="${BACKUP_LOCATION%/}" 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            fi 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            if [[ ! -d "${backupLocation}" ]]; then 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                echo -e "${YELLOW}Creating backup directory at ${backupLocation}${NC}" 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                mkdir "${backupLocation}" 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            fi 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            if [[ -z "${BACKUP_NAME}" ]]; then 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                backupLocation="${backupLocation}/musare-$(date +"%Y-%m-%d-%s").dump" 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            else 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                backupLocation="${backupLocation}/${BACKUP_NAME}" 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             fi 
														 | 
														
														 | 
														
															             fi 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-            echo -e "${YELLOW}Creating backup at ${scriptLocation%x}/backups/musare-$(date +"%Y-%m-%d-%s").dump${NC}" 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-            docker-compose exec -T mongo sh -c "mongodump --authenticationDatabase musare -u ${MONGO_USER_USERNAME} -p ${MONGO_USER_PASSWORD} -d musare --archive" > "${scriptLocation%x}/backups/musare-$(date +"%Y-%m-%d-%s").dump" 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            echo -e "${YELLOW}Creating backup at ${backupLocation}${NC}" 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            docker-compose exec -T mongo sh -c "mongodump --authenticationDatabase musare -u ${MONGO_USER_USERNAME} -p ${MONGO_USER_PASSWORD} -d musare --archive" > "${backupLocation}" 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         else 
														 | 
														
														 | 
														
															         else 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             echo -e "${RED}Error: .env does not exist${NC}" 
														 | 
														
														 | 
														
															             echo -e "${RED}Error: .env does not exist${NC}" 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         fi 
														 | 
														
														 | 
														
															         fi 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -299,6 +322,7 @@ if [[ -x "$(command -v docker)" && -x "$(command -v docker-compose)" ]]; then 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         echo -e "${YELLOW}start - Start services${NC}" 
														 | 
														
														 | 
														
															         echo -e "${YELLOW}start - Start services${NC}" 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         echo -e "${YELLOW}stop - Stop services${NC}" 
														 | 
														
														 | 
														
															         echo -e "${YELLOW}stop - Stop services${NC}" 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         echo -e "${YELLOW}restart - Restart services${NC}" 
														 | 
														
														 | 
														
															         echo -e "${YELLOW}restart - Restart services${NC}" 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        echo -e "${YELLOW}status - Service status${NC}" 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         echo -e "${YELLOW}logs - View logs for services${NC}" 
														 | 
														
														 | 
														
															         echo -e "${YELLOW}logs - View logs for services${NC}" 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         echo -e "${YELLOW}update - Update Musare${NC}" 
														 | 
														
														 | 
														
															         echo -e "${YELLOW}update - Update Musare${NC}" 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         echo -e "${YELLOW}attach [backend,mongo] - Attach to backend service or mongo shell${NC}" 
														 | 
														
														 | 
														
															         echo -e "${YELLOW}attach [backend,mongo] - Attach to backend service or mongo shell${NC}" 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -317,6 +341,7 @@ if [[ -x "$(command -v docker)" && -x "$(command -v docker-compose)" ]]; then 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         echo -e "${YELLOW}start - Start services${NC}" 
														 | 
														
														 | 
														
															         echo -e "${YELLOW}start - Start services${NC}" 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         echo -e "${YELLOW}stop - Stop services${NC}" 
														 | 
														
														 | 
														
															         echo -e "${YELLOW}stop - Stop services${NC}" 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         echo -e "${YELLOW}restart - Restart services${NC}" 
														 | 
														
														 | 
														
															         echo -e "${YELLOW}restart - Restart services${NC}" 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        echo -e "${YELLOW}status - Service status${NC}" 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         echo -e "${YELLOW}logs - View logs for services${NC}" 
														 | 
														
														 | 
														
															         echo -e "${YELLOW}logs - View logs for services${NC}" 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         echo -e "${YELLOW}update - Update Musare${NC}" 
														 | 
														
														 | 
														
															         echo -e "${YELLOW}update - Update Musare${NC}" 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         echo -e "${YELLOW}attach [backend,mongo] - Attach to backend service or mongo shell${NC}" 
														 | 
														
														 | 
														
															         echo -e "${YELLOW}attach [backend,mongo] - Attach to backend service or mongo shell${NC}" 
														 |