OpenShift application for web app with minified static files (npm run build)

473 Views Asked by At

I'm currently developing a web application composed of:

  • api: an API built with Flask in Python
  • app: a web app built with vue-cli (based on webpack), and minified with npm 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 and npm 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?

0

There are 0 best solutions below