Skip to content

Commit

Permalink
chore: updated start command file in order to use plugin or standalon…
Browse files Browse the repository at this point in the history
…e docker compose
  • Loading branch information
fless-lab committed Sep 2, 2024
1 parent efe3f78 commit f6cc853
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions bin/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,18 @@ echo "✅ Docker is installed."

echo "🔄 Checking for Docker Compose installation..."

# Check if Docker Compose is installed
if ! command -v docker-compose &> /dev/null; then
# Check if Docker Compose is installed and determine which command to use
if command -v docker-compose &> /dev/null; then
DOCKER_COMPOSE_CMD="docker-compose"
echo "✅ Docker Compose (standalone) is installed."
elif docker compose version &> /dev/null; then
DOCKER_COMPOSE_CMD="docker compose"
echo "✅ Docker Compose (plugin) is installed."
else
echo "❌ Docker Compose could not be found. Please install Docker Compose and try again."
exit 1
fi

echo "✅ Docker Compose is installed."

# Run the install script
echo "🔄 Running install.sh..."
bash "$PROJECT_ROOT/bin/install.sh"
Expand All @@ -42,5 +46,5 @@ echo "🔄 NODE_ENV set to $ENVIRONMENT in .env file."

# Start the Docker containers
echo "🔄 Starting Docker containers in $ENVIRONMENT mode..."
docker-compose up --build
echo "✅ Docker containers started."
$DOCKER_COMPOSE_CMD up --build
echo "✅ Docker containers started."

0 comments on commit f6cc853

Please sign in to comment.