Skip to content

Instantly share code, notes, and snippets.

View Phathdt's full-sized avatar
😆
there is always a reason to smile

Phathdt Phathdt

😆
there is always a reason to smile
  • Caliber Venture Builder
  • Ho Chi Minh city
View GitHub Profile

Using Elixir releases and multi-stage Docker files to simplify Phoenix deployment

This repo is my experiment in deploying a basic Phoenix app using the release feature from elixir 1.9 (https://elixir-lang.org/blog/2019/06/24/elixir-v1-9-0-released/) and docker, via a multi-stage Dockerfile (https://docs.docker.com/develop/develop-images/multistage-build/) leveraging bitwalker's docker images for Elixir and Phoenix.

Step 1: Install Elixir 1.9.1 (and Erlang)

The simplest way to manage Elixir versions is to use asdf.

@Phathdt
Phathdt / api_controller.rb
Created February 4, 2018 14:17 — forked from jordifierro/api_controller.rb
Example of an Rails api ApiController when using ActiveSupport::Concern to encapsulate controllers common code
module Api::V1
class ApiController < ApplicationController
include Concerns::Authenticator
include Concerns::ErrorHandler
include Concerns::VersionExpirationHandler
include Concerns::Internationalizator
end
end