skip to Main Content

I’m trying to deploy my Laravel application on Heroku but the assets that are in public folder aren’t loading.

Application url: https://drinkco.herokuapp.com

I’m already trying to force https on AppServiceProvider with the code:

if(env('REDIRECT_HTTPS')) {
  $this->app['request']->server->set('HTTPS', true);
}

Procfile configuration : web: vendor/bin/heroku-php-nginx -C nginx.conf public/

The files are beeing generated by npm run prod

print screen from console error

2

Answers


  1. use this one:

    web: vendor/bin/heroku-php-apache2 public/
    
    Login or Signup to reply.
  2. You should check to see if you included the assets folder inside of your .gitignore file.

    If you do not want to track changes to this folder, which you shouldn’t, you can include it back to your .gitignore file after deploying to heroku

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search