-
-
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.
- Loading branch information
Showing
16 changed files
with
211 additions
and
110 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
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
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,40 @@ | ||
# syntax=docker/dockerfile:1 | ||
FROM node:20-slim | ||
|
||
LABEL maintainer="Plone Community <[email protected]>" \ | ||
org.label-schema.name="frontend-prod-config" \ | ||
org.label-schema.description="Slim image for Plone frontend deployments" \ | ||
org.label-schema.vendor="Plone Foundation" | ||
|
||
|
||
# Install busybox and wget | ||
RUN <<EOT | ||
set -e | ||
apt update | ||
apt install -y --no-install-recommends busybox wget git | ||
busybox --install -s | ||
rm -rf /var/lib/apt/lists/* | ||
mkdir /app | ||
chown -R node:node /app | ||
EOT | ||
|
||
RUN corepack enable | ||
|
||
# Run the image with user node | ||
USER node | ||
|
||
# Set working directory to /app | ||
WORKDIR /app | ||
RUN corepack use pnpm@9 | ||
|
||
# Expose default Express port | ||
EXPOSE 3000 | ||
|
||
# Set healthcheck to port 3000 | ||
HEALTHCHECK --interval=10s --timeout=5s --start-period=30s CMD [ -n "$LISTEN_PORT" ] || LISTEN_PORT=3000 ; wget -q http://127.0.0.1:"$LISTEN_PORT" -O - || exit 1 | ||
|
||
# Entrypoint would be pnpm | ||
ENTRYPOINT [ "pnpm" ] | ||
|
||
# And the image will run in production mode | ||
CMD ["start:prod"] |
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,10 @@ | ||
packages: | ||
# all packages in direct subdirs of packages/ | ||
- "core/packages/volto" | ||
- "core/packages/types" | ||
- "core/packages/registry" | ||
- "core/packages/scripts" | ||
- "core/packages/tsconfig" | ||
- "core/packages/volto-slate" | ||
- "core/packages/coresandbox" | ||
- "packages/*" |
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,7 @@ | ||
const addons = []; | ||
const theme = ""; | ||
|
||
module.exports = { | ||
addons, | ||
theme, | ||
}; |
Oops, something went wrong.