Closed tylernchls closed 5 years ago
When an Angular app is built, the resulting html/js/css is located in the dist/project_name
directory. By default this image will look for a directory named build
, but you can change this
you need to set the OUTPUT_DIR environment variable to be dist/angular-web-app
resolved here https://github.com/lholmquist/angular-web-app/issues/2
how we do this when using console? Where to set this variable.
which console? If it is the web console, that value needs to be set in the buildConfig,
if you are talking about a terminal console, then you can use the oc
command with a template like this: https://github.com/lholmquist/angular-web-app#running-on-openshift
or is you are using straight up s2i on the command line, then something like this:
s2i build -e OUTPUT_DIR=angular-web-app/dist . nodeshift/ubi8-s2i-web-app:latest angular-web-app
which console? If it is the web console, that value needs to be set in the buildConfig,
if you are talking about a terminal console, then you can use the
oc
command with a template like this: https://github.com/lholmquist/angular-web-app#running-on-openshiftor is you are using straight up s2i on the command line, then something like this:
s2i build -e OUTPUT_DIR=angular-web-app/dist . nodeshift/ubi8-s2i-web-app:latest angular-web-app
I was able to do this by declare/set the variable using environment tab. Yes I was using web console.
Thanks for your reply.
Build completes then get this error
cmd: oc new-app nodeshift/centos7-s2i-web-app:latest~https://github.com/lholmquist/angular-web-app
npm info ok ---> Cleaning up npm cache ----> moving built web application to /opt/app-root/output mv: cannot stat './build/*': No such file or directory error: build error: non-zero (13) exit code from nodeshift/centos7-s2i-web-app@sha256:989207b23a6924d850d8970646c52379df3ec3c278a5