Run ng (Angular) commands from bluemix console

2019-08-05 04:30发布

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条回答
SAY GOODBYE
2楼-- · 2019-08-05 04:57

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
  1. Now, run ng build command from the project directory.
  2. You should see a dist folder. Go to the dist directory.
  3. login bluemix with cf login
  4. run cf push <app-name>

Your app should be deployed in bluemix. Hope this helps.

查看更多
登录 后发表回答