在云应用引擎上禁用幽灵写文件存储

Disable ghost write file storage on cloud app engine

我只是尝试将 Ghost 安装到 Google Cloud App Engine。我遵循 official instruction 但出现以下错误:

2020-07-25 10:40:52 default[20200725t173735] Error: EROFS: read-only file system, open '/workspace/node_modules/ghost/content/logs/https___yaskurweb_appspot_com_production.error.log'

然后我将 config.production.json 更改为:

"logging": {
    "level": "info",
    "rotation": {
        "enabled": true
    },
    "transports": ["file", "stdout"]
}

  "logging": {
    "transports": [
      "stdout"
    ]
  },

但是我在下面遇到了另一个错误:

2020-07-25 10:58:47 default[20200725t175429] Error: EROFS: read-only file system, copyfile '/workspace/node_modules/ghost/core/frontend/services/settings/default-routes.yaml' -> '/workspace/node_modules/ghost/content/settings/routes.yaml'

我认为这是 Ghost 试图将 routes.yaml 文件复制到另一个目录时引起的。所以我需要知道如何禁止在 Ghost 中写入任何文件?

我的完整 config.production.json 是:

{
  "url": "https://myproject.appspot.com",
  "fileStorage": false,
  "server": {
    "port": 8080,
    "host": "0.0.0.0"
  },
  "database": {
    "client": "mysql",
    "connection": {
      "host": "*",
      "port": "3306",
      "user": "dev",
      "password": "*",
      "database": "test_db"
    }
  },
  "mail": {
    "transport": "Direct"
  },
  "logging": {
    "transports": [
      "stdout"
    ]
  },
  "process": "systemd",
  "paths": {
    "contentPath": "content/"
  }
}

问题是配置将内容路径设置为 node_modules。它应该安装在根路径中。

所以我从:

  "paths": {
    "contentPath": "content/"
  }

  "paths": {
    "contentPath": "/workspace/content/"
  }

然后完美运行...