Heroku issues - nobu0605/accounting-application-api GitHub Wiki

set up the Heroku environment for deploy

1.set up the variables for Heroku
https://qiita.com/yukibe/items/5c1910e259ff4e6498db

2.If you face this error
SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 767 bytes

you need to change to like this.
'charset' => 'utf8',
'collation' => 'utf8_unicode_ci',
https://qiita.com/beer_geek/items/6e4264db142745ea666f

3.We need to set up Procfile. Otherwise we're gonna face 403 forbidden error
Home/Procfile
web: vendor/bin/heroku-php-apache2 public/


Error log

https://qiita.com/shin_moto/items/8e8ca6f8355df09ce827

or
heroku logs --tail


Heroku Key path error

If you faced this error
production.ERROR: Key path "file:///app/storage/oauth-private.key" does not exist or is not readable
, you need to execute the below command.
heroku ps:exec -a app_name

php artisan passport:keys

https://github.com/laravel/passport/issues/267#issuecomment-392222152


The commands after deploy

We can add commands to Procfile. https://qiita.com/ProjectEuropa/items/33b1054674f117f27bdf


After 1 or 2 hours, the keys are deleted.

I had to do these things.
1.php artisan vendor:publish --tag=passport-config 
2.Set up private key and public key to heroku env.
https://github.com/laravel/passport/issues/267#issuecomment-620293730 
https://laravel.com/docs/5.8/passport#deploying-passport