Move some commands to composer.json scripts section to ease installation

This commit is contained in:
Bubka 2022-03-28 15:11:44 +02:00
parent 21dbda5336
commit 1a68a8e91a
2 changed files with 14 additions and 7 deletions

View File

@ -95,15 +95,14 @@ ### Set up your database
### Set your variables
In your installation directory make a copy of the `.env.example` file and rename the copy `.env`.
Edit the `.env` file and adapt the settings to your running environment (see instructions in the file)
In your installation directory, edit the `.env` file and adapt the settings to your running environment (see instructions in the file).
If the file is missing simply make a copy of the `.env.example` file and rename the copy `.env`.
### Prepare some stuff
```sh
php artisan migrate:refresh
php artisan passport:install
php artisan storage:link
php artisan config:cache
```

View File

@ -59,11 +59,19 @@
"Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
"@php artisan package:discover --ansi"
],
"post-root-package-install": [
"@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
"pre-install-cmd": [
],
"post-create-project-cmd": [
"@php artisan key:generate --ansi"
"post-install-cmd": [
"@php -r \"file_exists('.env') || copy('.env.example', '.env');\"",
"@php artisan key:generate",
"@php artisan storage:link"
],
"pre-update-cmd": [
],
"post-update-cmd": [
"@php artisan cache:clear"
],
"test" : [
"vendor/bin/phpunit"