Apeli
Apeli

Reputation: 529

Deploying Laravel without regenerating key

We're deploying our Laravel app with Capistrano, which runs these commands after the deployment

cd /var/www/html/site/current php artisan key:generate php artisan config:clear php artisan migrate It deploys nicely, but running the "key:generate" command also logs out every active user.

In some cases, we would only need to update the files. Is it enough to leave out just the key:generate? Simply updating the files doesn't always seem to be enough.

Upvotes: 3

Views: 705

Answers (1)

Alexey Mezenin
Alexey Mezenin

Reputation: 163838

You should run this command only once during installation and then use the same key to avoid this kind of problems. So, just remove this line from the script:

php artisan key:generate

https://laravel.com/docs/5.5/installation

Upvotes: 2

Related Questions