Skip to content

carlo-colombo/elixir-buildpacks

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

elixir-buildpacks

A collection of buildpacks to build images of elixir projects

  1. erlang-runtime
  2. elixir-runtime
  3. mix-release download project dependencies and create an Elixir Release
  4. elixir meta buildpack that define the order in which buildpack run

In addition rg.nl-ams.scw.cloud/carlo-colombo/elixir-builder is a builder based on ubuntu:bionic including the 4 buildpacks.

This stack support org.cloudfoundry.stacks.cflinuxfs3 (cloudfoundry/cnb:cflinuxfs3) and io.github.carlo-colombo.elixir-builder

Umbrella applications

To create a release from an umbrella application run from the root of the application defining the release to build with the RELEASE env variable

pack build dashboard \
  --path . \
  --builder rg.nl-ams.scw.cloud/carlo-colombo/elixir-builder \
  -e RELEASE=dashboard -e SECRET_KEY_BASE=asdadasdasd

Note: is not supported to build individual release from the app folder, as in app dependency and configuration would be outside of the directory passed to pack.

Know limitations

  • It at least partially support phoenix, it requires to pass in SECRET_KEY_BASE as environment variable. For example
pack build dashboard \
  --path . \
  --builder rg.nl-ams.scw.cloud/carlo-colombo/elixir-builder \
  -e DEBUG=1 \
  -e SECRET_KEY_BASE="$(mix phx.gen.secret)"

How to build an image with pack

Using the builder image

pack build <elixir project image> \
  --path <elixir project> \
  --builder rg.nl-ams.scw.cloud/carlo-colombo/elixir-builder

Using individual buildpacks

pack build <elixir project image> \
  --path <elixir project> \
  --buildpack ./elixir/  \
  -b ./elixir-runtime/ \
  -b ./erlang-runtime/ \
  -b ./mix-release/ \
  --builder rg.nl-ams.scw.cloud/carlo-colombo/elixir-builder

How to create the builder image

cd elixir-builder
./build.sh

It create an image on the local docker named rg.nl-ams.scw.cloud/carlo-colombo/elixir-builder

About

No description or website provided.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages