Is it possible to get a unique key per slug / release from a running dyno? I was following this article to setup RAILS_CACHE_ID
(for expiring etags after deployments) but found that the dynos no longer ship with GIT configured (which causes this error):
fatal: Not a git repository (or any parent up to mount point /app)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
I also considered setting it in a config/initializers
to the current Time but obviously that wouldn't work across multiple dynos. Any ideas?
- Heroku Help How to download code from deployed app version ? Determine the release version number you want the code/slug to be downloaded from. The CLI command heroku releases -a <app_name> will show you all releases for your app. Run heroku slugs -a <app_name> to find the slug ID for the particular version selected.
Use the heroku ps command to see your release command running. The dyno type can be set using `heroku ps:type release= {type}, but only after the release phase is run for the first time. If the release command exits with a non-zero exit status, or if it’s shut down by the dyno manager, the release fails.
The Heroku Platform uses the container model to run and scale all Heroku apps. The containers used at Heroku are called “dynos.” Dynos are isolated, virtualized Linux containers that are designed to execute code based on a user-specified command. Your app can scale to any specified number of dynos based on its resource demands.
In such occurrences, the releases-retry CLI plugin can be used to retry a failed release without needing to trigger a new build on the app. To check on the status of a release, including failed releases and releases that are pending due to a long-running release command, run heroku releases.
There's a new (Nov 2015) labs feature which does just what you need "Dyno metadata" https://devcenter.heroku.com/changelog-items/768
heroku labs:enable runtime-dyno-metadata -a <app name>
Then on heroku:
~ $ env
HEROKU_APP_ID: 9daa2797-e49b-4624-932f-ec3f9688e3da
HEROKU_APP_NAME: example-app
HEROKU_DYNO_ID: 1vac4117-c29f-4312-521e-ba4d8638c1ac
HEROKU_RELEASE_VERSION: v42
HEROKU_SLUG_COMMIT: 2c3a0b24069af49b3de35b8e8c26765c1dba9ff0
HEROKU_SLUG_DESCRIPTION: Deploy 2c3a0b2
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With