Skip to content

Instantly share code, notes, and snippets.

@chiragtoor
Last active December 6, 2018 00:27
Show Gist options
  • Save chiragtoor/872c78a2919f9bfe095ce40560b7706f to your computer and use it in GitHub Desktop.
Save chiragtoor/872c78a2919f9bfe095ce40560b7706f to your computer and use it in GitHub Desktop.
FROM elixir:1.7
# Install Hex+Rebar
RUN mix local.hex --force && \
mix local.rebar --force
WORKDIR /opt/app
ENV MIX_ENV=prod
# Cache elixir deps
ADD . .
RUN mix deps.get
RUN mix release
# Use REPLACE_OS_VARS=true in order to swap runtime env values in rel/vm.args
ENV REPLACE_OS_VARS=true
# Do not use CMD, leads to issues receiving SIGTERM properly
ENTRYPOINT ["_build/prod/rel/ex_cluster/bin/ex_cluster", "foreground"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment