Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Elixir Releases

Elixir Releases

Getting Elxir deployed can be challenging. Especially if you want to do it the Erlang way. This talk provides some guidelines on what to take care of.

Leif Gensert

July 13, 2017
Tweet

More Decks by Leif Gensert

Other Decks in Programming

Transcript

  1. The Way /app/*.rb /lib/*.rb Gemfile $ install requirements $ export

    RAILS_ENV=production $ bundle install $ bundle exec rails server
  2. ?

  3. Build Run $ mix deps.get $ mix release $ _build/app

    start app.tar.gz: - Binaries - Erlang runtime (optional) - Sources (optional)
  4. use Mix.Config config :app, App.Repo, [ database: "app", username: "user",

    password: "supersecret", hostname: “db-server”, port: 5432, ] {'Elixir.QualityControl.Repo', [{database,<<"app">>}, {username,<<“user">>}, {password,<<"supersecret">>}, {hostname,<<“db-server”>>}, {loggers,[]}, {port,5433}]}, config.exs sys.config
  5. use Mix.Config config :app, App.Repo, [ database: "app", username: “user",

    password: System.get_env(“PG_PASS"), hostname: “db-server”, port: 5432, ] config.exs sys.config {'Elixir.QualityControl.Repo', [{database,<<"app">>}, {username,<<“user">>}, {password,nil}, {hostname,<<“db-server”>>}, {loggers,[]}, {port,5433}]},
  6. Replace Variables on Build System {:system, ENV, default} Check In

    Credentials REPLACE_OS_VARS=true Build Config Layer
  7. Why