laravel deployment failed on heroku

前端 未结 1 1218
名媛妹妹
名媛妹妹 2021-01-23 11:32

Some months ago I succeeded in deploying a Laravel 5.5 application on Heroku.

I tried to do the same today with a Laravel 6.12 application, and I have a lot of problems.

相关标签:
1条回答
  • 2021-01-23 12:05

    You're using the default file session driver, but this isn't a good fit on Heroku. Its filesystem is ephemeral and local to each dyno.

    Try using a different session driver by setting the SESSION_DRIVER environment variable:

    heroku config:set SESSION_DRIVER=cookie
    

    cookie is probably simplest, but memcached or redis would work well too if you have either of those set up.

    The default session driver didn't change between Laravel 5.5 and 6, but I wouldn't recommend using file with Laravel 5.5 on Heroku either.

    0 讨论(0)
提交回复
热议问题