bdd181425b
Docker Compose project with automated Playwright benchmarks comparing django-liveview 2.2.0 against Phoenix LiveView 1.0 across 6 scenarios.
33 lines
589 B
Docker
33 lines
589 B
Docker
FROM elixir:1.17-alpine AS build
|
|
|
|
RUN apk add --no-cache git nodejs npm build-base
|
|
|
|
WORKDIR /app
|
|
|
|
RUN mix local.hex --force && mix local.rebar --force
|
|
|
|
ENV MIX_ENV=prod
|
|
|
|
# Fetch Elixir deps first (cached layer)
|
|
COPY mix.exs ./
|
|
RUN mix deps.get
|
|
|
|
# Install JS deps from the now-fetched phoenix/phoenix_live_view deps
|
|
COPY assets/package.json assets/
|
|
RUN cd assets && npm install
|
|
|
|
# Copy source and compile
|
|
COPY config config
|
|
COPY lib lib
|
|
COPY priv priv
|
|
COPY assets assets
|
|
|
|
RUN mix deps.compile
|
|
RUN mix assets.deploy
|
|
RUN mix compile
|
|
RUN mix phx.digest
|
|
|
|
EXPOSE 4000
|
|
|
|
CMD ["mix", "phx.server"]
|