Heroku似乎忽略了app.json中的addons部分。

huangapple go评论62阅读模式
英文:

Heroku seems to be ignoring addons section in app.json

问题

我有一个包含app.json的项目,我试图添加额外的插件以与审查应用一起部署,然而,当我销毁并重新创建审查应用时,这些插件并未被创建。

以下是我的app.json:

{
  "name": "Redacted产品",
  "description": "Redacted平台的后端",
  "keywords": [],
  "website": "http://Redacted.com/",
  "repository": "https://github.com/Redacted/redacted",
  "success_url": "/api/schema/swagger-ui/",
  "env": {
    "REDACTED": {
      "value": "redacted"
    }
  },
  "formation": {
    "web": {
      "quantity": 1,
      "size": "basic"
    }
  },
  "addons": [
    "papertrail",
    "heroku-redis",
    {
      "plan": "heroku-postgresql",
      "options": {
        "version": "14"
      }
    }
  ],
  "buildpacks": [
    {
      "url": "heroku/python"
    },
    {
      "url": "https://github.com/buyersight/heroku-google-application-credentials-buildpack"
    }
  ],
  "environments": {
    "review": {
      "addons": [
        "autoidle:hobby"
      ]
    }
  }
}

使用这个app.json,postgres和autoidle被添加,并且环境变量起作用,然而,heroku-redis和papertrail没有被添加。

我尝试过:

  • 从插件中删除postgres,奇怪的是,当我销毁并重新创建审查应用时,它仍然会被添加。
  • 将papertrail作为对象而不是字符串,例如 { "plan": "papertrail" }
  • 销毁并重新创建审查应用

有人有任何建议吗?

英文:

I have a project with app.json, and I am trying to add additional addons to be deployed with review apps, however, the addons are not being created when I destroy and recreate the review app.

Here is my app.json:

{
  "name": "Redacted product",
  "description": "The backend for the Redacted Platform",
  "keywords": [],
  "website": "http://Redacted.com/",
  "repository": "https://github.com/Redacted/redacted",
  "success_url": "/api/schema/swagger-ui/",
  "env": {
    "REDACTED": {
      "value": "redacted"
    },
  },
  "formation": {
    "web": {
      "quantity": 1,
      "size": "basic"
    }
  },
  "addons": [
    "papertrail",
    "heroku-redis",
    {
      "plan": "heroku-postgresql",
      "options": {
        "version": "14"
      }
    }
  ],
  "buildpacks": [
    {
      "url": "heroku/python"
    },
    {
      "url": "https://github.com/buyersight/heroku-google-application-credentials-buildpack"
    }
  ],
  "environments": {
    "review": {
      "addons": [
        "autoidle:hobby"
      ]
    }
  }
}

With this app.json, postgres and autoidle are added, and the environment variables work, however, heroku-redis and papertrail are not added.

I have tried:

  • Removing postgres from addons, strangely it still gets added when I destroy and recreate the review app.
  • Having papertrail as an object instead of a string, eg {"plan": "papertrail"}
  • Destroying and recreating the review app

Does anyone have any suggestions?

答案1

得分: 1

答案是插件必须添加在"environments -> review -> addons"而不是顶层插件。

英文:

The answer is that the addons had to be added in environments -> review -> addons and not the top level addons.

huangapple
  • 本文由 发表于 2023年6月12日 19:27:19
  • 转载请务必保留本文链接:https://go.coder-hub.com/76456215.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定