Created
September 23, 2022 23:45
-
-
Save KevinDaSilvaS/1c1e8f47b24d0c6ea06792fad2431a0d to your computer and use it in GitHub Desktop.
dockerfile
This file contains 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 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