2 months ago
I'm trying to figure out how to customize a Railpack build to use the "ruby" provider, but skip installing Node.
I've figured out a way to skip the "install:node" and "prune:node" steps, but Node is still being installed (not sure if there's a better way to do this):
{
"$schema": "https://schema.railpack.com",
"provider": "ruby",
"steps": {
"install:node": {
"commands": []
},
"prune:node": {
"commands": []
}
}
}3 Replies
2 months ago
The Ruby provider installs Node as a language-level dependency (for asset compilation in Rails), which is separate from the step commands you overrode. Skipping install:node and prune:node steps removes those commands but doesn't prevent the Node language itself from being set up. This level of customization (disabling an auto-detected language entirely) is best addressed on the Railpack GitHub repo, where the maintainers can confirm if there's an existing config option or if it needs to be added as a feature.
Status changed to Awaiting User Response Railway • about 2 months ago
2 months ago
Also, is there a way to prevent Railpack from trying to copy "/app/node_modules" to the image when using the "ruby" provider?
Status changed to Awaiting Railway Response Railway • about 2 months ago
2 months ago
The /app/node_modules copy is part of the Ruby provider's built-in final image configuration, which is separate from the step commands you've already overridden. The Railpack config file schema doesn't currently expose a way to disable an auto-detected language or its associated paths. If you need full control over what gets included in the final image, using a Dockerfile instead of the Railpack Ruby provider would let you define exactly which directories are copied. Alternatively, you could open a feature request on the Railpack GitHub repo for a config option to exclude specific languages from a provider.
Status changed to Awaiting User Response Railway • about 2 months ago
a month ago
This thread has been marked as solved automatically due to a lack of recent activity. Please re-open this thread or create a new one if you require further assistance. Thank you!
Status changed to Solved Railway • about 1 month ago