Skip to content

Instantly share code, notes, and snippets.

@tchartron
Created June 16, 2021 07:58
Show Gist options
  • Save tchartron/50062e58608f09385092c38d08e41c0e to your computer and use it in GitHub Desktop.
Save tchartron/50062e58608f09385092c38d08e41c0e to your computer and use it in GitHub Desktop.
Setup a fresh laravel installation during development
#!/usr/bin/env bash
echo "Remove storage/app/public/img directory"
rm -rf storage/app/public/img
echo "Remove vendor directory"
rm -rf vendor
echo "Remove node_modules directory"
rm -rf node_modules
echo "Installing composer dependencies"
composer install
echo "Installing npm dependencies"
npm install
echo "Compiling frontend"
npm run dev
echo "Delete manticore previous index"
docker compose exec php php artisan manticore:delete index
echo "Create manticore ads index"
docker compose exec php php artisan manticore:create:index
echo "Migrate database tables"
docker compose exec php php artisan migrate:fresh
echo "Seed database tables"
docker compose exec php php artisan db:seed
echo "Job done"
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment