Railpack build crash because of fontconfig not detected
fauzifadhi
PROOP

a year ago

Hello Team, I was trying to use railpack build at my dev env and it is really great, but some build might not installed the font properly (never meet this issue with previous build type). basically i just need to change build with nixpack to make it work, but i want to use Railpack in my Prod Env since it give us faster build.

i am using a bash command to install the font and run it with the build command. it is like the font installed asynchronously, which is fine. but the fontconfig is not there.

npm run build:prod && chmod +x ./src/install-fonts.sh && ./src/install-fonts.sh

do i miss a config when using Railpack that make the fontconfig not found at random build?

Solved$30 Bounty

Pinned Solution

irazvan2745
FREE

a year ago

Why are you putting the fonts in the system font dir? just keep them in your project directory and use them from there

7 Replies

Railway
BOT

a year ago

Hey there! We've found the following might help you get unblocked faster:

If you find the answer from one of these, please let us know by solving the thread!


a year ago

This thread has been marked as public for community involvement, as it does not contain any sensitive or personal information. Any further activity in this thread will be visible to everyone.

Status changed to Open brody 11 months ago


irazvan2745
FREE

a year ago

Why are you putting the fonts in the system font dir? just keep them in your project directory and use them from there


a year ago

Hey, can you try specifying fontconfig with RAILPACK_BUILD_APT_PACKAGES (and RAILPACK_DEPLOY_APT_PACKAGES) as per the Railpack additional apt packages docs? I have seen a similar issue on GitHub that was caused by missing the fontconfig package.


10 months ago

Hey, did you try out the approach I have suggested above?


uxuz

Hey, can you try specifying `fontconfig` with `RAILPACK_BUILD_APT_PACKAGES` (and `RAILPACK_DEPLOY_APT_PACKAGES`) as per the [Railpack additional apt packages docs](https://railpack.com/guides/installing-packages/#apt)? I have seen a similar [issue on GitHub](https://github.com/lovell/sharp/issues/4249) that was caused by missing the `fontconfig` package.

fauzifadhi
PROOP

10 months ago

okay thank you, i will try to implement this.


irazvan2745

Why are you putting the fonts in the system font dir? just keep them in your project directory and use them from there

fauzifadhi
PROOP

10 months ago

Thank you, because of your comment, today I learn that we can make the fontconfig recognize the fonts via env vars.


fauzifadhi
PROOP

10 months ago

i am trying

- RAILPACK_DEPLOY_APT_PACKAGES = fontconfig

- FONTCONFIG_PATH = app/src/...

lets see, do i still get failed font installation or not from random deployment.


Status changed to Solved uxuz 11 months ago


Welcome!

Sign in to your Railway account to join the conversation.

Loading...