Skip to content

Commit

Permalink
Merge pull request #67 from data-catering/docker-compose
Browse files Browse the repository at this point in the history
Change to use 'docker compose' as 'docker-compose' is deprecated
  • Loading branch information
pflooky authored Sep 13, 2024
2 parents 6a8bb43 + afc90d3 commit 7c8623b
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand All @@ -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
}
Expand All @@ -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
Expand Down

0 comments on commit 7c8623b

Please sign in to comment.