A minimalistic website to store and view my favourite poems. https://poems.xirion.net/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

37 lines
684 B

2 years ago
FROM elixir:1.12-alpine AS builder
WORKDIR /build/dps
# Download + Compile dependencies
RUN mix local.rebar --force && mix local.hex --force
COPY mix.exs mix.lock ./
COPY config config
RUN mix do deps.get, deps.compile
# Compile static assets
COPY priv/static priv/static
RUN mix phx.digest
# Build
COPY . .
RUN mkdir -p /opt/release && \
mix release && \
mv _build/${MIX_ENV}/rel/dps /opt/release
# Runner image
FROM alpine:3 AS runner
RUN apk add --no-cache openssl ncurses-libs
RUN chown nobody:nobody /app
USER nobody:nobody
COPY --chown=nobody:nobody --from=builder /opt/release/dps .
CMD ["/app/bin/dps", "start"]