From 7a5b76c2c199af20cfa65e9a7919ea41548fef9e Mon Sep 17 00:00:00 2001 From: Matt Krick Date: Mon, 29 Apr 2024 18:26:50 -0700 Subject: [PATCH] fix: copy fonts from static Signed-off-by: Matt Krick --- .../parabol-ubi/dockerfiles/basic.dockerfile | 19 +++++++------------ scripts/webpack/prod.servers.config.js | 2 ++ 2 files changed, 9 insertions(+), 12 deletions(-) diff --git a/docker/images/parabol-ubi/dockerfiles/basic.dockerfile b/docker/images/parabol-ubi/dockerfiles/basic.dockerfile index 4905868c50e..169597e7302 100644 --- a/docker/images/parabol-ubi/dockerfiles/basic.dockerfile +++ b/docker/images/parabol-ubi/dockerfiles/basic.dockerfile @@ -2,22 +2,17 @@ ARG _NODE_VERSION=${_NODE_VERSION} FROM node:${_NODE_VERSION}-bookworm-slim as base # Install Fontconfig for SVG rendering -RUN apt-get update && apt-get install -y fontconfig unzip - -# Create a directory to store fonts -RUN mkdir -p /usr/share/fonts/plex - -# Download and install the IBM Plex font -ADD https://github.com/IBM/plex/releases/download/v5.0.1/IBM-Plex-Sans.zip /tmp/plex.zip -RUN unzip /tmp/plex.zip -d /usr/share/fonts/plex && rm /tmp/plex.zip +RUN apt-get update && apt-get install -y fontconfig ENV HOME=/home/node \ USER=node \ - FONTCONFIG_PATH=/etc/fonts - -ENV NPM_CONFIG_PREFIX=/home/node/.npm-global -ENV PORT=3000 + FONTCONFIG_PATH=/etc/fonts \ + NPM_CONFIG_PREFIX=/home/node/.npm-global \ + PORT=3000 +# Create a directory to store fonts +RUN mkdir -p /usr/share/fonts +COPY --chown=node ${HOME}/parabol/static/fonts /usr/share/fonts COPY --chown=node --chmod=755 docker/images/parabol-ubi/entrypoints/docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh COPY --chown=node docker/images/parabol-ubi/tools/ip-to-server_id ${HOME}/tools/ip-to-server_id diff --git a/scripts/webpack/prod.servers.config.js b/scripts/webpack/prod.servers.config.js index 2d81fd739df..dd1679a6b4d 100644 --- a/scripts/webpack/prod.servers.config.js +++ b/scripts/webpack/prod.servers.config.js @@ -94,6 +94,8 @@ module.exports = (config) => { new webpack.IgnorePlugin({resourceRegExp: /^pg-native$/, contextRegExp: /pg\/lib/}), new webpack.IgnorePlugin({resourceRegExp: /^exiftool-vendored$/, contextRegExp: /@dicebear/}), new webpack.IgnorePlugin({resourceRegExp: /^@resvg\/resvg-js$/, contextRegExp: /@dicebear/}), + new webpack.IgnorePlugin({resourceRegExp: /inter-regular.otf$/, contextRegExp: /@dicebear/}), + new webpack.IgnorePlugin({resourceRegExp: /inter-bold.otf$/, contextRegExp: /@dicebear/}), noDeps && new CopyWebpackPlugin({