Deploying to google app engine failed

2019-08-26 22:05发布

问题:

I'm trying to deploy an app using https://wiki.js.org/

After getting everything set up locally, and then trying to deploy to our app engine project it will go through its motions and say it's Updating Service, which is the last step.

After a minute or so I will get this response:

Updating service [default] (this may take several minutes)...failed.
ERROR: (gcloud.app.deploy) Error Response: [9]
Application startup error:

> wiki@1.0.78 start /app
> node wiki start

\u2714 Wiki.js has started successfully.

This is my app.yaml

runtime: nodejs
env: flex

this is the package.json part with the "start" script

{
  "name": "wiki",
  "version": "1.0.78",
  "description": "A modern, lightweight and powerful wiki app built on NodeJS, Git and Markdown",
  "main": "wiki.js",
  "scripts": {
    "start": "node wiki start",
    "stop": "node wiki stop",
    "restart": "node wiki restart",
    "build": "node tools/fuse",
    "dev": "node tools/fuse -d",
    "dev-configure": "node tools/fuse -c",
    "test": "jest",
    "postinstall": "opencollective postinstall"
  },

On my local environment, the process to start this app is to run node wiki start, but npm start also does the same thing.

回答1:

I am with GCP support. We have reproduced the issue a couple of times but it doesn’t look like an App Engine issue but one related to wiki.js. Only few third party libraries are officially supported by us and this is not one of them.

I have tried to solve the problem in a couple of ways anyway and I have found two suggestions in github (even if none worked for me):

Solution 1

Expand the memory adding the following lines to the app.yaml file 1:

 resources:
     cpu: 2
     memory_gb: 4.0
     disk_size_gb: 20

Solution 2

Add the following lines to the app.yaml:

health_check:
        enable_health_check: False

Try it and best of lucks!