[Spike] Deploy LB4 applications to Google Cloud Platform
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.
Moving out of GA scope, keeping deploying to IBM Cloud as the first priority in the same epic.
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 Were you able to solve this?? I am facing same issue.
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.
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.
you can deploy Dockerized application on google cloud run and it will work like charm
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.
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.