问题
I want to build my Angular project on the bluemix deploy pipeline. I have tried to create a new build order with a shell script but it just fails. What is the best practice for building the project on Bluemix?
Ex. "ng build --base-href /.../"
回答1:
From the project directory, Add manifest.yml
file. Check for the buildpack below.
applications:
- path: .
memory: 128M
instances: 1
domain: mybluemix.net
name: your_project_name
host: your_host_name
disk_quota: 128M
buildpack: staticfile_buildpack
- Now, run
ng build
command from the project directory. - You should see a dist folder. Go to the dist directory.
- login bluemix with
cf login
- run
cf push <app-name>
Your app should be deployed in bluemix. Hope this helps.
来源:https://stackoverflow.com/questions/48783226/run-ng-angular-commands-from-bluemix-console