How can I get heroku stack of the app for which buildpack is being executed.
I would like to invalidate the caches, if the stack has been changed since last build.
Example usecase: Apps migrating to the Celadon Cedar-14 Stack.
That's an old question but here is the answer. Just run the following command from your app folder with heroku toolbet installed.
$ heroku stack --app your-heroku-app-name
Here is the documentation: https://devcenter.heroku.com/articles/stack
Related
I have an old neglected Heroku stack (bamboo-mri-1.9.2) that I now want to upgrade to Heroku-20. I know bamboo-mri-1.9.2 has long ago stopped being supported, but when I attempt to upgrade via the CLI I get this:
heroku stack:set heroku-20 -a my_app
Setting stack to heroku-20... !
▸ this stack migration path is not available.
Via the Heroku dashboard gets a similar result.
I cannot find anything within Heroku or on Google to help - what do I need to do here?
So it turns out (via Heroku support) that you cannot upgrade from something this old, in this way.
You need to go through the process of creating a new Heroku app from within your original codebase.
https://devcenter.heroku.com/articles/upgrading-to-the-latest-stack#manually-created-test-app
Go to the section 'Manually Created test App' and follow the instructions there.
I created a Hugo application which I wanted to deploy through Heroku.
Following Hugo's instructions on their github readme, it says to create a Heroku app with the command:
$ heroku create --buildpack https://github.com/roperzh/heroku-buildpack-hugo.git
followed by:
$ git push heroku master
$ heroku open
Upon doing so, however, I keep getting an error:
remote: -----> Failed to detect app matching https://codon-buildpacks.s3.amazonaws.com/buildpacks/heroku/go.tgz buildpack
and the push ultimately fails.
Most of what I've looked up tells me that it needs a specification of what language is being used, which in this case is Go.
But even when doing:
heroku buildpacks:set -a myproject heroku/go
It tells me:
! The buildpack heroku/go is already set on your app.
So, if it's already set on my app, then why can't it detect an app matching the buildpack?
Check your hugo version using
hugo version
and then set your hugo version on heroku
for example 0.40
heroku config:set HUGO_VERSION=0.40 -a <your app name>
I have installed heroku with homebrew in my OSX El Capitan(10.11.5) and installed the heroku-container-tools with:
heroku plugins:install heroku-container-tools
The installation goes successfully:
Installing plugin heroku-container-tools... done
When I run a heroku version, I got this:
heroku-toolbelt/3.42.22 (universal.x86_64-darwin15) ruby/2.0.0
heroku-cli/5.2.20-9d094b0 (darwin-amd64) go1.6.2
=== Installed Plugins
heroku-container-tools#3.0.0
But when I run a heroku container:init I got this:
! `container:init` is not a heroku command.
! See `heroku help` for a list of available commands.
Running heroku help container I got this:
Usage: heroku container
Use Docker to build and deploy Heroku apps
Use Docker to build and deploy Heroku apps
Additional commands, type "heroku help COMMAND" for more details:
container:login # Logs in to the Heroku Docker registry
container:push [PROCESS] # Builds, then pushes a Docker image to deploy your Heroku app
I am following this heroku tutorial: https://devcenter.heroku.com/articles/local-development-with-docker
In the tutorial is said to run heroku container:init
This command was replaced but some other and heroku did not updated their documentation or I have some problem installing the plugin?
Yes, they restricted access to their container registry, just read the warning on top of the tutorial you're following https://devcenter.heroku.com/articles/local-development-with-docker
heroku container:release, which creates a Heroku-compatible slug and
deploys it to Heroku, has been deprecated. For access to our container
registry (available in private beta), please contact
docker-feedback#heroku.com
now there are only login and push commands. I hope you can easily ask for the access.
I have seen posts that you can change the build on Heroku, to use PhantomJS with the Cedar stack, but is it possible to run a headless browser on the unicorn stack?
Yes, and someone already wrote a buildpack for including PhantomJS (the internet and open source are amazing).
If you want to run headless PhantomJS on a Heroku dyno, you will need to:
Switch to Heroku multi-buildpack: https://github.com/ddollar/heroku-buildpack-multi
Setup Ruby buildpack for your app: https://github.com/heroku/heroku-buildpack-ruby
Setup PhantomJS buildpack for your needs: https://github.com/stomita/heroku-buildpack-phantomjs
The multi buildpack must be configured as the official Heroku buildpack. You then need to add the other two buildpack URLs to the .buildpacks file. There are additional details for configuring each buildpack at the links above.
Using this, you should be able to deploy your Rails app, run your PhantomJS code/tests, all on a single dyno headlessly.
I have a meteor project created with meteorite under version control and I'm trying to deploy it to Heroku using the heroku buildpack oortcloud/heroku-buildpack-meteorite but I this error:
! Heroku push rejected, no Cedar-supported app detected
Is it a problem with the build package or I need extra configuration in my app?, It's the first time I deploy an App to heroku so I'm not very familiarized with it.
As I mentioned in the question I'm very new to Heroku and this time I made a silly mistake.
In the buildpackage documentation it says you just need to use heroku create --stack cedar --buildpack https://github.com/oortcloud/heroku-buildpack-meteorite.git command and then git push. What I did't realized was that the command creates a new app in heroku and I had mine created already.
So the solution is:
heroku config:add BUILDPACK_URL=https://github.com/oortcloud/heroku-buildpack-meteorite.git