# #!/bin/bash # # Define the compose file to use (since you currently only have one) # COMPOSE_FILE="docker-compose.yml" # if [ "$1" == "--dev" ]; then # echo "========================================" # echo "๐Ÿงช STARTING DEVELOPMENT MODE" # echo "========================================" # # Run Docker Compose for local development # DOCKER_BUILDKIT=1 docker compose -f $COMPOSE_FILE up -d --build # else # echo "========================================" # echo "๐Ÿš€ DEPLOYING TO PRODUCTION" # echo "========================================" # # 1. Ensure we are on the master branch # echo "--> ๐ŸŒฟ Checking out master branch..." # git checkout master # # 2. Pull the latest changes from master # echo "--> ๐Ÿ“ฅ Pulling latest changes..." # git pull origin master # # 3. Run Docker Compose for production # # --remove-orphans cleans up old containers if you changed service names # echo "--> ๐Ÿณ Building and starting containers..." # DOCKER_BUILDKIT=1 docker compose -f $COMPOSE_FILE up -d --build --remove-orphans # echo "โœ… Deployment Complete!" # fi