s2i-nodejs-container icon indicating copy to clipboard operation
s2i-nodejs-container copied to clipboard

Support for FB create-react-app

Open vnugent opened this issue 7 years ago • 1 comments

Is there a way to customize how node app is launched? For apps created with FB create-react-app I'd like to create an image with npm run build and serve contents from the ./build dir. At the moment when the pod starts, the app is built again with npm start,

vnugent avatar May 22 '18 17:05 vnugent

Is there a way to customize how node app is launched?

You can add your own .s2i/bin/run script into source code of our app. [1] Probably the most safest way is to copy https://github.com/sclorg/s2i-nodejs-container/blob/master/8/s2i/bin/run and change it to your needs.

@kasicka You understand it more. Does it make sense to add this somehow in our run script?

[1] https://blog.openshift.com/override-s2i-builder-scripts/

omron93 avatar May 23 '18 09:05 omron93