Deploy script keeps throwing errors #493
-
|
I am trying get an Envoyer style zero-downtime deployment going. However, for the life of me, I can't figure out what I am doing wrong (hopefully just a simple oversight!). Here is the deployment script: # Validate required environment variables
if [ -z "${SITE_PATH:-}" ]; then
echo 'Error: SITE_PATH is not set'
exit 1
fi
if [ -z "${COMMIT_ID:-}" ]; then
echo 'Error: COMMIT_ID is not set'
exit 1
fi
# create the directory for latest code
mkdir -p "$SITE_PATH/deployments/$COMMIT_ID"
cd "$SITE_PATH/deployments/$COMMIT_ID" || exit
# get the code and install packages
cd $SITE_PATH
git fetch --all
git reset --hard origin/$BRANCH
git pull origin $BRANCH
composer install --no-interaction --prefer-dist --optimize-autoloader --no-dev
# linking
rm -rf storage/
ln -s "$SITE_PATH/storage" storage
ln -s "$SITE_PATH/.env" .env
# carry out prep tasks
php artisan migrate
# change path to latest app
ln -s "$SITE_PATH/deployments/$COMMIT_ID" "$SITE_PATH/latest"
# cache the new config and routes
php artisan config:cache
php artisan route:cacheThis keeps throwing errors as below: bash: line 13: [: missing `]'
bash: line 13: quot: command not found
bash: line 13: /home/vito/domain_name: Is a directory
bash: line 13: quot: command not found
bash: line 13: ]: command not found
bash: line 18: [: missing `]'
bash: line 18: quot: command not found
bash: line 18: 68a8d074b0b16ecbdf7d28b1a8d978895ce680f6: command not found
bash: line 18: quot: command not found
bash: line 18: ]: command not found
bash: line 24: quot: command not found
bash: line 24: /home/vito/domain_name/deployments/68a8d074b0b16ecbdf7d28b1a8d978895ce680f6: No such file or directory
bash: line 24: quot: command not found
mkdir: missing operand
Try 'mkdir --help' for more information.
bash: -c: line 25: syntax error near unexpected token `||'
bash: -c: line 25: `cd "$SITE_PATH/deployments/$COMMIT_ID" || exit'I have just replaced the domain name part in these logs. Would be awesome to get some help! The vito instance is version |
Beta Was this translation helpful? Give feedback.
Answered by
saeedvaziry
Oct 16, 2025
Replies: 1 comment
-
|
If ZeroDowntime is the intent, you can use Vito's Modern Deployment feature which deploys with zero downtime |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
sausin
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If ZeroDowntime is the intent, you can use Vito's Modern Deployment feature which deploys with zero downtime