Skip to content

Instantly share code, notes, and snippets.

@rafaeltuelho
Last active November 1, 2018 13:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rafaeltuelho/9eea5908d63baf586ef96f849382f537 to your computer and use it in GitHub Desktop.
Save rafaeltuelho/9eea5908d63baf586ef96f849382f537 to your computer and use it in GitHub Desktop.
Building Webpack JS apps on Openshift
oc new-build nodejs:8~${CI_REPOSITORY_URL} --name=${CI_PROJECT_NAME}-node-s2i

create the 2nd build step using the output of the 1st built (webpack-js)...

oc new-build --name=${CI_PROJECT_NAME}-nginx \
   --image-stream nginx \   
   --source-image=${CI_PROJECT_NAME}-node-s2i \
   --source-image-path=/opt/app-root/src/dist/.:.

create the app from the build result"

oc new-app ${CI_PROJECT_NAME}-nginx --name ${CI_PROJECT_NAME}

expose the app to the Openshift router"

oc expose svc/${CI_PROJECT_NAME}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment