This commit is contained in:
@ -1,4 +1,4 @@
|
||||
FROM elixir:1.18.1-alpine AS build
|
||||
FROM elixir:1.18.3-otp-27-alpine AS build
|
||||
|
||||
# install build dependencies
|
||||
RUN apk add --no-cache build-base npm git python3
|
||||
@ -25,13 +25,12 @@ RUN npm --prefix ./assets ci --progress=false --no-audit --loglevel=error
|
||||
COPY lib lib
|
||||
COPY priv priv
|
||||
COPY assets assets
|
||||
RUN npm run --prefix ./assets deploy
|
||||
RUN mix do phx.digest, gettext.extract
|
||||
|
||||
# compile and build release
|
||||
# uncomment COPY if rel/ exists
|
||||
# COPY rel rel
|
||||
RUN mix do compile, release
|
||||
RUN mix do assets.deploy, compile, release
|
||||
|
||||
# prepare release image
|
||||
FROM alpine:latest AS app
|
||||
@ -43,6 +42,8 @@ WORKDIR /app
|
||||
|
||||
RUN chown nobody:nobody /app
|
||||
|
||||
ENV MIX_ENV=prod
|
||||
|
||||
USER nobody:nobody
|
||||
|
||||
COPY --from=build --chown=nobody:nobody /app/_build/prod/rel/memex ./
|
||||
|
Reference in New Issue
Block a user