buildpack prepare --plan-out generates invalid railpack file?

19 hours ago

I am trying to get a sense of what a fully-configured railpack.json file looks like, so I am running buildpack prepare --plan-out to generate one (actually two, one for a golang app and one for an npm app). In both cases, the generated file does not validate against the railpack schema, because the steps item is an array of steps rather than a map of step names to step definitions. Is this expected? If I just assemble the steps into an appropriate map, does that make it a valid build plan?

2 Replies

iloveitaly
HOBBY

11 hours ago

@brotskydotcom I'm curious why you are trying to write a full railpack.json file? Is there some default configuration that is incorrect for your scenario that you are trying to handle?

railpack.json has not been given the care and attention as the no-config build path, so there are some sharp edges. The reason for this is we don't want people to use railpack.json unless they have no other choice, and we've tried to improve the automatic configuration detection logic to handle more and more cases so railpack.json is only less necessary over time.

That being said, I have run into what you are describing before but I thought I fixed it. Could you share your generated railpack.json if there are no secrets/sensitive information so I can take a look?

I'm hoping to start working on an update to the railpack.json syntax soon and would love to understand your use case more.

Thanks!


@iloveitaly Thanks much for the fast and helpful reply. I have attached the two railpack.json files I generated - both are from your examples folder (one from node-npm and one from go-mod) so there's nothing secret there.

As to why I am doing this: I am trying to generate a build that has puppeteer's installation of Chrome as well as a golang program that uses the embedded Chrome. I was hoping I could use railpack to execute the puppeteer stuff as part of the build, but failing that I can have the golang app execute the puppeteer scripts as long as I have both node and the golang app installed. So this is essentially a dual goland+node app, and I couldn't find any way to get railpack to recognize that. Maybe I can specify both providers?

Thanks for any help!


Welcome!

Sign in to your Railway account to join the conversation.

Loading...