Search code examples
ibm-cloudcloud-foundryibm-cloud-code-engine

IBM Cloud Code Engine: App works locally, but does not become ready in Code Engine


I have a Node.js app. It works fine when run locally and when deployed to Cloud Foundry. Now, I tried to move this app to IBM Cloud Code Engine. It builds ok, but it does not seem to become ready during the deployment stage.

I can see this error in the logs.

Internal error:
RevisionFailed: Revision "myNodeJSapp-1" failed with message: Initial scale was never achieved

What might be the reason for this?


Solution

  • This is related to the port, your app listens to. It is not something specific to Node.js apps, but could also happen with Python, Go, and other apps. By default, Code Engine tries to reach your app on port 8080. If your app uses a different port (like, e.g., 5000 or 3000), you either need to tell Code Engine about it or modify the code to use the port injected via the PORT environment variable.

    See this troubleshooting guide for more help on the problem of the app not getting ready.