skip to Main Content

My existing deployment method of Heroku app is GitHub, Now I am planning to deploy the application using Heroku container (Docker based). I am facing "Error: This command is for Docker apps only. Run git push heroku main to deploy" issue, while I am heroku container:release web --app {MyHerokuAppName}}

CMD:Root Directory> heroku login

CMD:Root Directory>heroku container:login

CMD:Root Directory>heroku stack:set container --app {{MyHerokuAppName}}

CMD:Root Directory> docker tag {{DockerImageName}}:latest registry.heroku.com/{{MyHerokuAppName}}/web

CMD:Root Directory>docker push registry.heroku.com/{{MyHerokuAppName}}/web

CMD:Root Directory>heroku container:release web --app {{MyHerokuAppName}}

I am facing issue in the last step.

2

Answers


  1. Chosen as BEST ANSWER

    I have destroyed the {{MyHerokuAppName}} and recreate the same app and then we could set the stack and as container and push the code and release also done from Powershell of my local system.

    the reason will be if we are using other than "Container" deployment for an app then it will not clear/reset the deployment stack/type of dyno.

    While doing the app destroy, we need taking care on the resources which are attached.


  2. There is a workaround for this. On the release step if you downgrade to the latest v8.* heroku cli the release works successfully. It looks like a bug was introduced in v9.0.0 of the heroku cli!

    Github issue here: https://github.com/heroku/cli/issues/2951

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