【问题标题】:Disable ghost write file storage on cloud app engine在云应用引擎上禁用幽灵写入文件存储
【发布时间】:2020-07-25 11:35:25
【问题描述】:

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

2020-07-25 10:40:52 默认[20200725t173735] 错误:EROFS:只读 文件系统,打开 '/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 默认[20200725t175429] 错误:EROFS:只读 文件系统,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/"
  }
}

【问题讨论】:

    标签: javascript node.js google-app-engine ghost-blog


    【解决方案1】:

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

    所以我改变了:

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

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

    然后完美运行...

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2021-11-30
      • 2014-01-19
      • 1970-01-01
      • 1970-01-01
      • 2018-05-09
      • 1970-01-01
      • 2014-04-06
      • 2014-08-17
      相关资源
      最近更新 更多