Skip to content

Commit

Permalink
fix: install plex on system (#9689)
Browse files Browse the repository at this point in the history
Signed-off-by: Matt Krick <matt.krick@gmail.com>
  • Loading branch information
mattkrick committed Apr 30, 2024
1 parent f066ab0 commit 95a95a1
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
13 changes: 12 additions & 1 deletion docker/images/parabol-ubi/dockerfiles/basic.dockerfile
@@ -1,8 +1,19 @@
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

ENV HOME=/home/node \
USER=node
USER=node \
FONTCONFIG_PATH=/etc/fonts

ENV NPM_CONFIG_PREFIX=/home/node/.npm-global
ENV PORT=3000
Expand Down
Expand Up @@ -22,7 +22,8 @@ export const generateIdenticon = async (userId: string, name: string) => {
.join('') || 'pa'
const avatar = createAvatar(initials, {
seed,
backgroundColor
backgroundColor,
fontFamily: ['IBM Plex Sans']
})
const svgBuffer = await avatar.toArrayBuffer()
const pngBuffer = await sharp(svgBuffer).png().toBuffer()
Expand Down

0 comments on commit 95a95a1

Please sign in to comment.