Last active
November 26, 2016 02:02
-
-
Save MrCoffey/fff0556fa62131f726355b514704ce3b to your computer and use it in GitHub Desktop.
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
# Sets the Docker image that will be used as a base. | |
FROM trenpixster/elixir:1.3.0 | |
# Compiles app | |
RUN mkdir /app | |
WORKDIR /app | |
ENV MIX_ENV prod | |
# Injects AWS env variables explained below | |
ENV HOST_VARS inject_here | |
# Installs all the Elixir Dependencies | |
ADD mix.* ./ | |
RUN mix local.rebar | |
RUN mix local.hex --force | |
RUN mix deps.get | |
# Installs the app | |
ADD . . | |
RUN prod mix compile | |
# Exposes this port from the docker container to the host machine | |
EXPOSE 4000 | |
# Migrate the database | |
CMD mix ecto.migrate | |
# Starts the phoenix server | |
CMD mix phoenix.server |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment