How to install packages for service in Railway (NixPacks)

1 min read
NixPacks is like docker file for setup your service.
I have 2 packages need to be installed to able to use a library convert pdf to images: 'graphicsmagick', 'ghostscript'
In Railway, to modify nixpacks, just need to create nixpacks.toml
file in the root folder.
Below is a simple nixpacks file just to install above packages into my service:
# https://nixpacks.com/docs/configuration/file
[dependencies]
# List any additional dependencies if needed
nodejs = "18.x"
[phases.setup]
aptPkgs = ['...', 'graphicsmagick', 'ghostscript']
0
Subscribe to my newsletter
Read articles from The Brown Box directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
