Reputation: 191
When deploying my laravel application to heroku i get a fail of Procfile not found. How do I create this? and what does this file need to have. I can't access the app via the browser because of the 403 forbidden error.
The exact error message when pushing files to heroku:
NOTICE: No Procfile, using 'web: vendor/bin/heroku-php-apache2'.
Upvotes: 2
Views: 8382
Reputation: 315
The following points are important to avoid this error:
echo "web: vendor/bin/heroku-php-apache2 public/" > Procfile
without the quotes.
echo web: vendor/bin/heroku-php-apache2 public/ > Procfile
ucfirst
format.To push from another local branch, run the following command:
git push heroku your-local-branch:master
So, if you're pushing from the local-dev
branch, you should run:
git push heroku local-dev:master
Upvotes: 0
Reputation: 2047
A Procfile is a file named Procfile and is a mechanism for declaring what commands are run by your application’s dynos on the Heroku platform.
So you need to create a file on your public
directory, name it Procfile
and add the following:
web: vendor/bin/heroku-php-apache2
After this save it and upload it to your server.
Upvotes: 6
Reputation: 925
Create it with these commands:
echo web: vendor/bin/heroku-php-apache2 public/ > Procfile
git add .
git commit -m "Procfile for Heroku"
Upvotes: 6