Created
June 8, 2021 14:42
-
-
Save capitalist/6778576e5a21400746529b8656244622 to your computer and use it in GitHub Desktop.
Phoenix Docker
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM elixir:latest | |
ENV HOME /opt/my_app | |
RUN mkdir -p $HOME | |
WORKDIR $HOME | |
ENV MIX_ENV dev | |
ENV PORT ${PORT:-4000} | |
EXPOSE $PORT | |
RUN mix local.hex --force | |
RUN mix local.rebar --force | |
COPY mix.* $HOME | |
RUN mix deps.get | |
RUN mix deps.compile | |
COPY . $HOME | |
RUN mix compile | |
CMD mix do ecto.migrate, phx.server |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment