-
-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #47 from plone/pnpm-and-yarn-images
Build both pnpm and yarn images
- Loading branch information
Showing
20 changed files
with
214 additions
and
122 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# syntax=docker/dockerfile:1 | ||
ARG VOLTO_VERSION | ||
FROM plone/frontend-builder:${VOLTO_VERSION} as builder | ||
|
||
# Build Volto Project and then remove directories not needed for production | ||
COPY pnpm-workspace.yaml /app/ | ||
RUN --mount=type=cache,id=pnpm,target=/app/.pnpm-store/uid=1000 <<EOT | ||
set -e | ||
pnpm build | ||
rm -rf node_modules | ||
pnpm install --prod | ||
EOT | ||
|
||
FROM plone/frontend-prod-config:${VOLTO_VERSION} as base | ||
|
||
LABEL maintainer="Plone Community <[email protected]>" \ | ||
org.label-schema.name="plone-frontend" \ | ||
org.label-schema.description="Plone frontend image" \ | ||
org.label-schema.vendor="Plone Foundation" | ||
|
||
# Copy Volto project | ||
COPY --from=builder /app/ /app/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# syntax=docker/dockerfile:1 | ||
FROM node:20-slim | ||
ARG VOLTO_VERSION | ||
ENV PNPM_HOME="/pnpm" | ||
ENV PATH="$PNPM_HOME:$PATH" | ||
|
||
LABEL maintainer="Plone Community <[email protected]>" \ | ||
org.label-schema.name="frontend-base" \ | ||
org.label-schema.description="Plone frontend builder image" \ | ||
org.label-schema.vendor="Plone Foundation" | ||
|
||
RUN <<EOT | ||
set -e | ||
apt update | ||
apt install -y --no-install-recommends python3 python3-pip build-essential git ca-certificates pipx | ||
rm -rf /var/lib/apt/lists/* | ||
EOT | ||
|
||
RUN <<EOT | ||
set -e | ||
pipx run --no-cache cookieplone sub/frontend_project --no_input __version_plone_volto=$VOLTO_VERSION | ||
chown -R node:node /app | ||
EOT | ||
|
||
COPY --chown=node:node volto.config.js /app/ | ||
|
||
RUN corepack enable | ||
USER node | ||
|
||
WORKDIR /app | ||
RUN --mount=type=cache,id=pnpm,target=/app/.pnpm-store,uid=1000 <<EOT | ||
set -e | ||
git clone -b $VOLTO_VERSION --depth 1 https://github.com/plone/volto core | ||
pnpm install | ||
EOT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.