Add a static site buildpack, useful for react and vue apps, can be nginx or other web server
Is your feature request related to a problem? Please describe. A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] If this feature is related to an existing issue, please provide a link to that as well
Describe the solution you'd like A clear and concise description of what you want to happen.
Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.
Additional context Add any other context or screenshots about the feature request here.
It can be detected via if has folder build or dist, if yes then should add nginx with SPA/pushstate config Seems useful because frontend static apps currently are hard to run in google buildpacks
Also there is already an nginx buildpack as utils.
And the detect script can also detect an nginx.conf and apply it instead for further customization
I'm assuming that you're building your react/vue apps in CI/CD pipeline, and you just want to deploy the compiled files using a static site buildpack?
I have a backend node js app, I run pack build with google buildpack builder and it obviously works.
I want to run the same command for the frontend react app and that it will still work (npm run build products dist folder so should be able to serve it)
There is no CI CD, Basically, The pack build command runs npm run build by default as it should, and then runs npm start. It should in my opinion check via some env param if it is an SPA frontend and if so then instead of npm start should serve the dist/build folder
Ah okay, that makes a lot of sense. We've been seeing this kind of use case/request a lot. It could similarly help with easily serving markdown-generated HTML sites (e.g. Hugo, Jekyll), or pre-compiled applications (e.g. Go executables, Java, Java native images, etc.)
Yes indeed could be useful, will this issue be in like a roadmap or something? I would have tried coding it yet have no knowledge about buildpacks