Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

What do you think about doing npm install only? #11

Closed
3 tasks
pyama86 opened this issue Aug 21, 2019 · 7 comments
Closed
3 tasks

What do you think about doing npm install only? #11

pyama86 opened this issue Aug 21, 2019 · 7 comments

Comments

@pyama86
Copy link

pyama86 commented Aug 21, 2019

Hi team!
Thank you for your commitment to cnb.
by the way, I think, we not always need npm start.
For example, I usualy make architecture with javascript for frontend and php for backend.
In this case use the web server is httpd or nginx, that's why I can't need npm start

do you have a plan for npm only use npm install?

Please confirm where necessary:

  • I have included a log output
  • My log includes an error message
  • I have included steps for reproduction
@cf-gitbot
Copy link

We have created an issue in Pivotal Tracker to manage this:

https://www.pivotaltracker.com/story/show/168022847

The labels on this github issue will be updated when the story is started.

@zmackie
Copy link
Contributor

zmackie commented Aug 23, 2019

So in this case, npm-cnb would just be used for compiling the frontend app, served by php backend?

@pyama86
Copy link
Author

pyama86 commented Aug 23, 2019

You are right.
In this case, only javascript library install to node_modules by npm .

@zmackie
Copy link
Contributor

zmackie commented Aug 23, 2019

You should be able to specify the buildpacks you want to run as an argument to pack ie something like pack build --buildpacks=org.cloudfoundry.node-engine,org.cloudfoundry.npm,org.cloudfoundry.php-web,org.cloudfoundry.nginx

@zmackie
Copy link
Contributor

zmackie commented Aug 23, 2019

What'll happen in that case is that npm insstall will occur, and then later cnbs will provide app start commands.

@pyama86
Copy link
Author

pyama86 commented Aug 24, 2019

oh!! I understand.
Since php-web-cnb and npm-cnb have the same value processes-> type = web written in launch.toml, Thats' why When php-web-cnb is executed after npm-cnb, npm start is overwritten and not executed

https://github.com/cloudfoundry/npm-cnb/blob/master/modules/modules.go#L97
https://github.com/cloudfoundry/php-web-cnb/blob/master/phpweb/contributor.go#L173

Thank you for your answer!

@zmackie
Copy link
Contributor

zmackie commented Aug 24, 2019 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants