# hexpm's Alpine build rather than the official elixir:1.20.4-otp-28-alpine,
# which has no amd64 image; its Alpine is the one alpine:latest below
# points at.
FROM docker.io/hexpm/elixir:1.20.4-erlang-28.5.0.8-alpine-3.24.3
MAINTAINER Gabe <gmp@gmp.io>
ARG app_name=lambent_ex
ARG phoenix_subdir=.
ARG build_env=prod
ENV MIX_ENV=${build_env} TERM=xterm
WORKDIR /opt/app
RUN apk update \
&& apk --no-cache --update add git make gcc g++ erlang-dev openssl-dev npm openssh \
&& mix local.rebar --force \
&& mix local.hex --force
COPY . .
RUN mix do deps.get, compile
# RUN npm install -g npm
RUN cd ${phoenix_subdir}/assets \
&& npm ci \
&& cd ../ \
&& mix phx.digest \
&& mix assets.deploy
RUN mix release ${app_name} \
&& mv _build/${build_env}/rel/${app_name} /opt/release \
&& mv /opt/release/bin/${app_name} /opt/release/bin/start_server
FROM alpine:latest
ARG project_id
RUN apk update \
&& apk --no-cache --update add bash ca-certificates openssl-dev libgcc libstdc++ libcrypto3 iproute2 nmap
EXPOSE 8033
WORKDIR /opt/app
COPY --from=0 /opt/release .
RUN mkdir -p /opt/app/meta && \
cd /opt/app/meta \
&& /opt/app/bin/start_server eval ":dets.open_file(:lex_metadata, [type: :set])"
ENV PHX_SERVER=true
ENV PORT 8033
CMD exec /opt/app/bin/start_server start
neiam
/lambent_ex
Lambent Aether 5
public · Issues · Pulls · Labels · Forks · Compare · Actions queued · Badges · Packages
⭐
Log in to mark this repository.
1.3 KiB · text
History
9c0fc16