Gigalixir and .buildpack

The guidance states this:
“We rely on buildpacks to compile and build your release. Create a .buildpacks file with the following contents…”

Simple question because I’ve never done this before. What’s the .buildpack file and where does it go? My best guess is a new file called .buildpack (like .gitignore) in the very top level of my Phoenix app. Is that correct?

The linked documentation says it has to be called .buildpacks, you even quoted that line.

And I have to assume that it has to live in the git-root of your project, but that is an assumption based on how other systems are configured which do see a git repository as their atomic building block, like gitlab-ci, travis, heroku, etc…

@nobbz Norbert, too true. Atom even has an icon for .buildpacks. That’s where I’ll put it and it can only break if it’s not right :slight_smile:

Yes that is correct, it should go at the top of your repository.

Hi Jason @axelson
I’ve built my first release :grinning: using distillery and only ran into a couple of errors the most notable being:

Duplicated modules: 
unicode_util specified in unicode_util_compat and stdlib

Which was fixed with
mix deps.clean --all && mix deps.get

But I’m not understanding a key step with the deploy to gigalixir. I’ve installed the CLI and I’m logged in to my account.
What do I have to do before this works:

git push gigalixir master

The guidance seems to be weighted towards creating the app in gigalixir.
My project is of course working with my own git repo (local and remote).

Any pointers welcomed.

Well, I ran the following command:

gigalixir set_git_remote app_name

And it recognised:

git push gigalixir master

But then it requested a username and password which are apparently not the credentials for the gigalixir CLI / account.

Bit stuck now. Hope this is useful feedback to the folks at gigalixir.

@shotleybuilder did you already login on the command line?

Otherwise maybe it’s your SSH key:

Or maybe your SSH key has a passphrase set on it?

What error are you getting exactly?

1 Like

Thanks @axelson that’s an idea worth exploring since I’ve not touched ssh. Off to the day job now but I’ll return to this tonight. If that doesn’t help I’ll ask for support from the folks at gigalixir.
Yes, logged into the gigalixir command line and various commands are working against my account.

The solution.

gigalixir create --name app-name

This isn’t explicitly mentioned in the docs so far as I can see. And the thread of the instructions for those with an existing app to deploy branches before app naming gets mentioned.

@jesse has been very helpful. My next problem is the erlsom library, which is breaking my deployment, but that’s another problem for another day!

Apart from here!
But my thought process went along the lines of: I have my app, I don’t need to create another … and given the warnings about not being able to change names and things I didn’t want to experiment! However, deleting an app was painless

gigalixir scale -r 0 app-name
gigalixir delete_app app-name


I’m glad you got it sorted out! Jesse is indeed very helpful.

1 Like

woohoo, it’s deployed! It’s not working (well, some bits are working). My goal this Christmas was a working deploy - well that’s dealt with what I thought would be the hardest part - deploying.

The last piece was switching around my erlsom dependency. The former defaults to ssh which breaks in a container (apparently, what do i know?)

From this:
{:erlsom, git: ""}

To this:
{:erlsom, git: “”}

1 Like

Last post on this thread from me. The final piece of my jigsaw was pointing my newly minted domain at the newly created app instance on gigalixir. I struggled embarrassingly with this. And serves to show that there is a market for PaaS - people like me!

The interface on 1&1 just had me really confused, but my lightbulb, and this’ll make you laugh, was realising www was a subdomain. Now in the last 6-months I’ve lost count of the new tech I’ve had to learn-ish (Elixir, Phoenix, Erlsom, Floki, Brunch, all the front end stuff, it’s a long list). Tackling 1&1 and subdomains - that’s just another very small brick in an otherwise unstable pile of bricks.

The guidance from gigalixir was spot-on but with a small edit just for me. Point a CNAME record for a www subdomain to

Happy Christmas everyone.


Has anyone gotten this error–

Unable to select a buildpack
remote: Command '[u'docker', u'run', u'--rm', u'-e', u'GIGALIXIR_SHOULD_CLEAN_CACHE=False’,
u'-v', u'/tmp/tmpAd_yw7/islands:/tmp/app', u'-v', u'/tmp/gigalixir/cache/islands/:/tmp/cache’,
u'-v', u'/tmp/tmpAd_yw7/env:/tmp/env', u'--env=USER=www-data', u'']' returned non-zero exit status 1

–on git push gigalixir master?

my project

Needed to do git subtree push --prefix <path/to/dir> gigalixir master

Then needed to add assets_path=apps/islands_interface/assets in phoenix_static_buildpack.config of /island_interface.

Then needed to tweak relative paths for phoenix and phoenix_html. And was able to deploy!


Hey English3000 I am seeing a similar error in deployment as well.

-----> Unable to select a buildpack
remote: Command '[u'docker', u'run', u'--rm', u'-e', u'GIGALIXIR_SHOULD_CLEAN_CACHE=False', u'-v', u'/tmp/tmp4P1kJ1/worrisome-beneficial-cuscus:/tmp/app', u'-v', u'/tmp/gigalixir/cache/worrisome-beneficial-cuscus/:/tmp/cache', u'-v', u'/tmp/tmp4P1kJ1/env:/tmp/env', u'--env=USER=www-data', u'']' returned non-zero exit status 1
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to ''

Can you provide more details on how you solved this issue.

Please provide a link to your repo.

Alternatively, go to the #gigalixir channel in the Elixir Slack (IIRC).