#!/bin/bash
set -e

if [ -z "$1" ]; then
  echo "Usage: $0 <project_path>"
  exit 1
fi

PROJECT_PATH=$1

echo "Deploying project..."
cd "$PROJECT_PATH" || { echo "Directory not found: $PROJECT_PATH"; exit 1; }
git pull origin production
docker compose up -d --no-deps --build nextapp
echo "Deployment finished!"
