Skip to content

Instantly share code, notes, and snippets.

@izshreyansh
Last active January 9, 2021 14:26
Show Gist options
  • Save izshreyansh/3a135244f2d879a459a64643c9f1b8d7 to your computer and use it in GitHub Desktop.
Save izshreyansh/3a135244f2d879a459a64643c9f1b8d7 to your computer and use it in GitHub Desktop.
Forge recipe
cd /home/forge/project
$FORGE_PHP artisan down
git pull origin master
$FORGE_COMPOSER install --no-interaction --prefer-dist --optimize-autoloader
( flock -w 10 9 || exit 1
echo 'Restarting FPM...'; sudo -S service $FORGE_PHP_FPM reload ) 9>/tmp/fpmlock
if [ -f artisan ]; then
$FORGE_PHP artisan migrate --force
$FORGE_PHP artisan optimize
fi
yarn install
yarn run production
$FORGE_PHP artisan up
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment