|
|
|
|
@ -21,7 +21,7 @@ WORKDIR /wiki
|
|
|
|
|
|
|
|
|
|
COPY --chown=node:node ./assets ./assets
|
|
|
|
|
COPY --chown=node:node ./blocks/compiled ./blocks/compiled
|
|
|
|
|
COPY --chown=node:node ./server ./server
|
|
|
|
|
COPY --chown=node:node ./backend ./backend
|
|
|
|
|
COPY --chown=node:node ./dev/build/config.yml ./config.yml
|
|
|
|
|
COPY --chown=node:node ./LICENSE ./LICENSE
|
|
|
|
|
|
|
|
|
|
@ -35,18 +35,15 @@ ENV NODE_ENV=production
|
|
|
|
|
ENV PUPPETEER_SKIP_DOWNLOAD=true
|
|
|
|
|
ENV PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium
|
|
|
|
|
|
|
|
|
|
WORKDIR /wiki/server
|
|
|
|
|
RUN pnpm install --prod --frozen-lockfile
|
|
|
|
|
WORKDIR /wiki/backend
|
|
|
|
|
RUN npm ci --omit=dev
|
|
|
|
|
|
|
|
|
|
# The Puppeteer extension, which server-side page rendering needs. Added here rather than declared in
|
|
|
|
|
# `backend/package.json` because it is an optional extension: an installation that renders its pages in
|
|
|
|
|
# the editor -- which is all of them, on any normal save -- has no use for a browser on the server, and
|
|
|
|
|
# a source checkout should not have to fetch one to install the backend. Pinned like every other
|
|
|
|
|
# dependency, so an image build is reproducible.
|
|
|
|
|
RUN pnpm add puppeteer@25.4.0
|
|
|
|
|
|
|
|
|
|
# Set extensions as installed
|
|
|
|
|
RUN touch node_modules/sharp/wiki_installed.txt
|
|
|
|
|
RUN npm install --no-save puppeteer@25.4.0
|
|
|
|
|
|
|
|
|
|
WORKDIR /wiki
|
|
|
|
|
|
|
|
|
|
|