You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 variablesif [ -z"${SITE_PATH:-}" ];thenecho'Error: SITE_PATH is not set'exit 1
fiif [ -z"${COMMIT_ID:-}" ];thenecho'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 packagescd$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:cache
This keeps throwing errors as below:
bash: line 13: [: missing `]'bash: line 13: quot: command not foundbash: line 13: /home/vito/domain_name: Is a directorybash: line 13: quot: command not foundbash: line 13: ]: command not foundbash: line 18: [: missing `]'bash: line 18: quot: command not foundbash: line 18: 68a8d074b0b16ecbdf7d28b1a8d978895ce680f6: command not foundbash: line 18: quot: command not foundbash: line 18: ]: command not foundbash: line 24: quot: command not foundbash: line 24: /home/vito/domain_name/deployments/68a8d074b0b16ecbdf7d28b1a8d978895ce680f6: No such file or directorybash: line 24: quot: command not foundmkdir: missing operandTry '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 2.2.1
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
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:
This keeps throwing errors as below:
I have just replaced the domain name part in these logs. Would be awesome to get some help! The vito instance is version
2.2.1
Beta Was this translation helpful? Give feedback.
All reactions