From afc90d3193225c0f66b4509c9c6dfb667783f4db Mon Sep 17 00:00:00 2001 From: Flook Peter Date: Fri, 13 Sep 2024 16:02:38 +0800 Subject: [PATCH] Change to use 'docker compose' as 'docker-compose' is deprecated --- run.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/run.sh b/run.sh index a8b8889..3db524c 100755 --- a/run.sh +++ b/run.sh @@ -77,10 +77,10 @@ connect_to_service() { shutdown_service() { if [ -z "$1" ]; then echo "Shutting down all services..." - docker-compose -f "$SCRIPT_DIR/docker-compose.yaml" down + docker compose -f "$SCRIPT_DIR/docker-compose.yaml" down else echo "Shutting down services: $*..." - docker-compose -f "$SCRIPT_DIR/docker-compose.yaml" down "$@" + docker compose -f "$SCRIPT_DIR/docker-compose.yaml" down "$@" fi } @@ -94,8 +94,8 @@ check_docker_installed() { echo -e "${RED}Error: docker could not be found${NC}" exit 1 fi - if ! command -v docker-compose &>/dev/null; then - echo -e "${RED}Error: docker-compose could not be found${NC}" + if ! command -v docker compose &>/dev/null; then + echo -e "${RED}Error: docker compose could not be found${NC}" exit 1 fi } @@ -112,7 +112,7 @@ check_persist_flag() { startup_services() { echo -e "${GREEN}Starting up services...${NC}" - docker-compose $COMPOSE_FILES up -d --quiet-pull "$@" + docker compose $COMPOSE_FILES up -d --quiet-pull "$@" if [ $? != 0 ]; then echo -e "${RED}Error: Failed to start up services${NC}" exit 1