<filename>backend/Dockerfile
FROM elixir:1.10.1-slim

# basic dependencies to make it all work
RUN apt-get update -qq && apt-get -y --allow-unauthenticated install curl libpq-dev postgresql-client git make erlang-crypto apt-transport-https

COPY . .

RUN mix local.hex --force
RUN mix local.rebar --force
RUN mix deps.get
RUN mix phx.gen.secret

ENV MIX_ENV=prod
ENV DATABASE_URL=ecto://postgres:postgres@db/todo_phoenix_prod
ENV SECRET_KEY_BASE='<KEY>

RUN mix deps.update mime
RUN mix compile
