Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: copy fonts from static #9690

Merged
merged 1 commit into from
Apr 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 7 additions & 12 deletions docker/images/parabol-ubi/dockerfiles/basic.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 2 additions & 0 deletions scripts/webpack/prod.servers.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand Down
Loading