I deployed the python file on heroku by referring to this article. Record the solution because an error occurred on the way.
$ heroku login
$ heroku create <app name>
requirements.txt
(Deployment procedure is written on the Deploy page of the created app)$ heroku git: clone -a <app name>
$ cd <app name>
$ git add .
$ git commit -am "make it better"
$ git push heroku master
ERROR
No default language could be detected for this app.
(venv) ~/p/post_notice_heroku (master|✔) $ git push heroku master
Counting objects: 33, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (31/31), done.
Writing objects: 100% (33/33), 6.59 KiB | 844.00 KiB/s, done.
Total 33 (delta 12), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: ! No default language could be detected for this app.
remote: HINT: This occurs when Heroku cannot detect the buildpack to use for this application automatically.
remote: See https://devcenter.heroku.com/articles/buildpacks
remote:
remote: ! Push failed
remote: Verifying deploy...
remote:
remote: ! Push rejected to <app name>.
remote:
To https://git.heroku.com/<app name>.git
![remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/<app name>.git'
It is necessary to set the build pack.
Select python from here.
Run $ heroku buildpacks: set heroku / python
(venv) ~/p/post_notice_heroku (master|…) $ heroku buildpacks:set heroku/python
Buildpack set. Next release on <app name> will use heroku/python.
Run git push heroku master to create a new release using this buildpack.
App not compatible with buildpack: https://buildpack-registry.s3.amazonaws.com/buildpacks/heroku/python.tgz
(venv) ~/p/post_notice_heroku (master|…) $ git push heroku master
Counting objects: 33, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (31/31), done.
Writing objects: 100% (33/33), 6.59 KiB | 844.00 KiB/s, done.
Total 33 (delta 12), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> App not compatible with buildpack: https://buildpack-registry.s3.amazonaws.com/buildpacks/heroku/python.tgz
remote: More info: https://devcenter.heroku.com/articles/buildpacks#detection-failure
remote:
remote: ! Push failed
remote: Verifying deploy...
remote:
remote: ! Push rejected to <app name>.
remote:
To https://git.heroku.com/<app name>.git
![remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/<app name>.git'
This was because I didn't create requirements.txt
in the file I was pushing.
The external library needs to be described in this txt file.
Please verify your account to install this add-on plan
venv) ~/p/post_notice_heroku (master|✔) $ heroku addons:add scheduler:standard
Creating scheduler:standard on ⬢ <app name>... !
▸ Please verify your account to install this add-on plan (please enter a credit card) For more information, see
▸ https://devcenter.heroku.com/categories/billing Verify now at https://heroku.com/verify
It ran $ heroku addons: create scheduler: standard
to introduce a heroku scheduler that runs regularly on heroku Occasionally occurs.
To use the heroku scheduler, you need to register your credit card.
After registering your credit card, you can set it from the console by doing $ heroku addons: create scheduler: standard
again.
Couldn't find that app. This happened when I was creating and deleting some apps on Heroku.
Looking at ʻopen .git / config`,
[remote "heroku"]
url = https://git.heroku.com/<app name>.git
Since this
Recommended Posts