I'm currently developing a web application composed of:
api
: an API built with Flask in Pythonapp
: a web app built with vue-cli (based on webpack), and minified withnpm run build
I've successfully built the api
with an OpenShift Python S2I (source-to-image) image: python-36-rhel7
.
I'd like to be able to automatically build the static web app
from source and serve it through Nginx or Apache, in a separate app from the same project.
It should:
- download the
app
source from the git repo (context-dir=/app/) - install
npm
- build it with
npm install
andnpm run build
- serve the built html+js+css files
There exist a node.js S2I image but it seems to be more suited for Express.js apps.
What would be the best way to build and serve a minified static web app on OpenShift?