2023-10-13 11:08:34 +13:00
|
|
|
FROM hexpm/elixir:1.15.4-erlang-26.0.2-ubuntu-focal-20230126
|
2022-03-26 10:17:01 +13:00
|
|
|
# install build dependencies
|
|
|
|
USER root
|
|
|
|
RUN apt-get update
|
2022-08-23 11:44:21 +12:00
|
|
|
RUN apt-get install -y wget
|
2023-10-03 19:02:03 +13:00
|
|
|
RUN apt-get install -y gnupg
|
2022-08-23 11:44:21 +12:00
|
|
|
RUN wget https://packages.erlang-solutions.com/erlang-solutions_2.0_all.deb
|
|
|
|
RUN dpkg -i erlang-solutions_2.0_all.deb
|
|
|
|
RUN apt-get update
|
2023-09-09 04:06:32 +12:00
|
|
|
RUN apt-get install -y git
|
|
|
|
RUN apt-get install -y gcc
|
|
|
|
RUN apt-get install -y g++
|
2023-01-14 09:14:14 +13:00
|
|
|
RUN apt-get install -y make
|
2023-09-09 04:06:32 +12:00
|
|
|
RUN apt-get install -y curl
|
2022-03-26 10:17:01 +13:00
|
|
|
RUN apt-get install -y build-essential
|
2023-10-13 11:08:34 +13:00
|
|
|
ENV DEBIAN_FRONTEND=noninteractive
|
2022-08-23 11:44:21 +12:00
|
|
|
RUN apt-get install -y esl-erlang
|
2023-09-09 04:06:32 +12:00
|
|
|
RUN apt-get install -y apt-transport-https
|
|
|
|
RUN apt-get install -y ca-certificates
|
2023-10-13 11:08:34 +13:00
|
|
|
RUN apt-get install -y fuse3 libfuse3-dev libglib2.0-dev
|
|
|
|
RUN apt-get install -y sqlite3
|
|
|
|
COPY --from=flyio/litefs:0.5 /usr/local/bin/litefs /usr/local/bin/litefs
|
2023-09-09 04:06:32 +12:00
|
|
|
ENV NODE_MAJOR=16
|
|
|
|
RUN mkdir -p /etc/apt/keyrings
|
|
|
|
RUN curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg
|
|
|
|
RUN echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list
|
2022-03-26 10:17:01 +13:00
|
|
|
RUN apt-get update
|
2023-09-09 04:06:32 +12:00
|
|
|
RUN apt-get install -y nodejs
|
|
|
|
RUN npm install --global 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-10-19 11:34:50 +13:00
|
|
|
COPY ./assets/tailwind.colors.json ./assets/tailwind.colors.json
|
2023-01-18 15:33:49 +13:00
|
|
|
RUN mix deps.get
|
|
|
|
RUN mix deps.compile
|
2022-03-26 10:17:01 +13:00
|
|
|
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
|
2023-10-13 11:08:34 +13:00
|
|
|
COPY ./litefs.yml ./litefs.yml
|
|
|
|
ENTRYPOINT litefs mount
|