I have a simple project which has just an html, a folder with a css file, another folder with a js file, and another with images. In order to deploy it to heroku, I read I had to create the index.php, require the home.html and create a composer.json with only a {}
in it, as it says: Uploading a static site on Heroku?
When I use the command git push heroku master
to deploy it, it complains about this: NOTICE: No runtime required in composer.lock; using PHP ^7.0.0
NOTICE: No runtime required in composer.lock; using PHP ^7.0.0
., and the project is not available on the link provided.
If it helps, my project's structure is as simple as this:
I don't know if that Notice is just a warning, but I find it very strange that Heroku can't deploy such a simple project.
I'm not sure where you were suggested to use just {}
, as the doc says to use the following within composer.json
:
{
"require": {
"php": "^7.2.0"
}
}
https://devcenter.heroku.com/articles/php-support#php-runtimes
Please move your index.php to folder and point via Procfile. Also make sure that your composer.json is valid.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.