-
Notifications
You must be signed in to change notification settings - Fork 314
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add Elixir releases support #153
Conversation
Do you have any examples of how to configure this? Does it also work with automatic deployment through github integration (on heroku)? |
If your apps are connected in a Heroku pipeline, "Promote to production..." will instantly deploy the staging slug to all production environments without recompilation. This is what I had in mind. |
I just tried this out, thanks! I ran into a problem with my phoenix app though. The releases are built before the phoenix buildpack generates the asset files so they don't get included. Is there a way to work round this or is something needed in the phoenix buildpack? |
I can see three ways to go about this:
In fact I think option 1. is better behaviour than the current one. I will move the hook. |
I had a go at option 3 here https://github.com/chrismcg/elixir-mix-release-buildpack. It works a bit better for me as there's a lot in the phoenix buildback I wouldn't want to have to reproduce. For those just building API or non phoenix apps I think this PR would still be a good thing to have in the Elixir buildpack so it stays a "one stop shop". |
I've tidied my buildpack up a little, it's at https://github.com/chrismcg/heroku-buildpack-elixir-mix-release now. |
Done! |
Elixir 1.9 introduced
mix release
. This is a huge improvement for Heroku based deployments because the slug can be compiled once and then deployed to different apps with different configs which will be read at runtime.This PR adds a new option to build the default release on top of the usual compilation process. After the slug is compiled the release can be run by having
web: _build/prod/rel/{app_name}/bin/{app_name} start
. We at Tallarium already use this setup in all our Elixir Heroku apps.