ash_hq/Dockerfile

34 lines
1.1 KiB
Docker
Raw Normal View History

2022-04-05 18:20:36 +12:00
FROM hexpm/elixir:1.13.3-erlang-24.0.5-ubuntu-xenial-20210114
2022-03-26 10:17:01 +13:00
# install build dependencies
USER root
RUN apt-get update
RUN apt-get install -y git gcc g++ make curl
RUN apt-get install -y build-essential
RUN curl -sL https://deb.nodesource.com/setup_16.x | bash -
RUN curl -sL https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -
RUN echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list
RUN apt-get update
RUN apt-get install -y nodejs yarn
2022-04-05 18:20:36 +12:00
RUN mix local.hex --force && \
mix local.rebar --force
2022-03-26 10:17:01 +13:00
ENV MIX_ENV=prod
COPY ./assets/package.json assets/package.json
COPY ./assets/package-lock.json assets/package-lock.json
RUN npm install --prefix ./assets
COPY ./mix.exs .
COPY ./mix.lock .
COPY ./config/config.exs config/config.exs
COPY ./config/prod.exs config/prod.exs
2022-04-05 18:20:36 +12:00
RUN mix deps.get && \
2022-03-26 10:17:01 +13:00
mix deps.compile
COPY ./lib ./lib
COPY ./priv ./priv
COPY ./assets ./assets
RUN mix assets.deploy
RUN mix compile
2022-04-01 13:06:38 +13:00
COPY ./config/runtime.exs config/runtime.exs
2022-03-26 10:17:01 +13:00
COPY ./rel ./rel
RUN mix release --overwrite
RUN mkdir indexes
CMD ["_build/prod/rel/ash_hq/bin/ash_hq", "start"]