Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
dockerfile
FROM elixir as releaser
WORKDIR /app
COPY ./ .
RUN mix local.hex --force
RUN mix local.rebar --force
RUN mix deps.get
RUN mix deps.compile
WORKDIR /app/apps/server
RUN MIX_ENV=prod mix compile
RUN mix phx.digest
WORKDIR /app
RUN MIX_ENV=prod mix release
FROM debian as final
EXPOSE 4000
ENV PORT=4000
ENV MIX_ENV=prod
ENV SHELL=/bin/bash
WORKDIR /app
COPY --from=releaser app/_build/prod/rel/src .
COPY --from=releaser app/ .
CMD ["./bin/src"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment