loopback-next icon indicating copy to clipboard operation
loopback-next copied to clipboard

[Spike] Deploy LB4 applications to Google Cloud Platform

Open bajtos opened this issue 8 years ago • 8 comments

Find out what's needed to deploy LB4 applications to Google Cloud Platform and write a short document describing the steps.

See #1446 for more details and acceptance criteria.

bajtos avatar Jun 25 '18 08:06 bajtos

Moving out of GA scope, keeping deploying to IBM Cloud as the first priority in the same epic.

dhmlau avatar Aug 07 '18 18:08 dhmlau

Update: Copying everything from "devDependencies" to "dependencies" solved the problem. Deployment works now. On a side note, something like engines": {"node": ">=8.9"}, is not allowed in GCP App Engine, but engines": {"node": ">=9"}, or engines": {"node": ">=10"}, are fine.

@bajtos I have been trying to deploy an LB4 app to GCP App Engine with no luck.

Using the standard or the flexible environment, I get this error in the logs: sh: 1: lb-tsc: not found. In the standard env, this happens after successful deployment and is reflected in the logs when trying to access the app. In the flexible env, this prevents the deployment completion, giving Application startup error: sh: 1: lb-tsc: not found.

It seems like the node modules are not being installed. I tried adding this to package.json: "gcp-build": "npm install", but the same failure happens. I also tried changing "start": "node .", to "start": "npm install && node .", but no effect.

I tried some of the suggestions from this issue but no avail.

I used nodejs10.

Any pointers are appreciated.

shadyanwar avatar May 24 '19 20:05 shadyanwar

@shadyanwar Were you able to solve this?? I am facing same issue.

ajaysheoran2323 avatar Nov 13 '19 06:11 ajaysheoran2323

The dev dependency @loopback/build is needed to transpile TS into JS. For deployment, if you have run npm run build to create the application package, use node . instead npm start to start the application as npm start triggers npm run build for development purposes. Or you can change npm start to run node . directly.

raymondfeng avatar Nov 13 '19 19:11 raymondfeng

This issue has been marked stale because it has not seen activity within six months. If you believe this to be in error, please contact one of the code owners, listed in the CODEOWNERS file at the top-level of this repository. This issue will be closed within 30 days of being stale.

stale[bot] avatar Dec 25 '20 17:12 stale[bot]

you can deploy Dockerized application on google cloud run and it will work like charm

lonewolfaka9 avatar Apr 13 '21 03:04 lonewolfaka9

This issue has been marked stale because it has not seen activity within six months. If you believe this to be in error, please contact one of the code owners, listed in the CODEOWNERS file at the top-level of this repository. This issue will be closed within 30 days of being stale.

stale[bot] avatar Oct 10 '21 04:10 stale[bot]

This issue has been closed due to continued inactivity. Thank you for your understanding. If you believe this to be in error, please contact one of the code owners, listed in the CODEOWNERS file at the top-level of this repository.

stale[bot] avatar Nov 09 '21 04:11 stale[bot]