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.
Related
Is it possible to run heroku-cli-commands like heroku regions from the Heroku Dashboard?
I tried to run those in the console, but it did not work..
From the heroku explanation page, as well as the appearance of the console, it seems that you can only run commands that start with heroku run (Example: npm start).
That means you can run commands there for the app, and heroku will pass them to it. Like you could run if the app was running on your computer. But do not run regular heroku cli commands, for example install an add-on, through the dashboard on the website, but only through heroku cli
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 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.
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
I want to use a scala script in console on Heroku.
So, after command
$heroku run bash
I try a script ./scala_script.sh, but the result is scala: not found.
So, how to install scala or even some package on Heroku?
Thanks
If this is a Scala app, you should use the Scala buildpack. You can hardcode the buildpack url:
$ heroku config:set BUILDPACK_URL=https://github.com/heroku/heroku-buildpack-scala
If you need Scala in addition to Play! Framework, you can experiment with buildpack-multi to get both buildpacks applied to your app.