Packages
mandrag
0.8.1
1.0.0-pre.0
0.8.1
0.8.0
0.7.3
0.7.2
0.7.1
0.7.0
0.6.10
0.6.9
0.6.8
0.6.7
0.6.6
0.6.5
0.6.4
0.6.3
0.6.2
0.6.1
0.6.0
0.5.1
0.5.0
0.4.1
0.4.0
0.3.3
0.3.2
0.3.1
0.3.0
0.2.4
0.2.1
retired
0.2.0
retired
0.1.1
0.1.0
0.0.21
0.0.20
0.0.19
0.0.18
0.0.17
0.0.16
0.0.15
0.0.14
0.0.13
0.0.12
0.0.11
0.0.10
0.0.9
0.0.7
0.0.6
0.0.5
0.0.4
0.0.3
0.0.2
0.0.1
Build and Deploy Elixir releases to Kubernetes via Helm
Current section
Files
Jump to
Current section
Files
priv/Dockerfile
# Build intermediate image to build relase
FROM bitwalker/alpine-elixir-phoenix:latest as builder
ARG name=phoenix
ENV name=${name} MIX_ENV=prod
ADD . .
# If there's assets, install and build them
RUN if [ -d assets ]; then \
mix deps.get && cd assets && \
if [ -f package-lock.json ]; then npm install && npm run deploy; fi && \
if [ -f yarn.lock ]; then apk add --update --no-cache yarn && yarn install && yarn deploy; fi && \
cd .. && mix phx.digest; \
fi
# Build the release
RUN mix release
# Build the actual release image
FROM bitwalker/alpine-erlang:latest
ARG name
ENV name=${name} PORT=4000 MIX_ENV=prod SHELL=/bin/sh REPLACE_OS_VARS=true
EXPOSE 4000
CMD /opt/app/bin/$name start
COPY --from=builder /opt/app/_build/prod/rel/$name .