I am trying to use the Sharp nodejs library to render text on a template image. I want to use a specific font and you can’t use the standard ways as specific by W3C to dynamically load a font due to an underlying library not supporting it
The problem is that I don’t really build the container myself. I just do “fly deploy” on my nodejs app and the magic happens. How can I get custom commands into the generated container?
I ssh console in and do it manually. fontconfig is already installed so I only really have to copy files to the correct place and run the fc-cache command which works nice
So I was thinking “let’s copy files from inside nodejs when it starts” but that is a no-go due to file permissions.
So, is there a way to run essentially the following to commands with correct permission
Problem solved eventually. Created a Dockerfile, set it up, installed what needed to be installed, debugged the create image for a couple of hours because of stupid COPY errors in the Dockerfile and now it works (and needed a couple of changes in fly.toml)