【问题标题】:Is it possible to manually fetch the buildpack on Heroku?是否可以在 Heroku 上手动获取 buildpack?
【发布时间】:2016-05-20 07:16:09
【问题描述】:

我正在尝试将[buildpack][1] 添加到我的Heroku app

heroku buildpacks --app appname 1. heroku/python 2. https://github.com/heroku/heroku-buildpack-pgbouncer.git 3. https://github.com/beanieboi/nginx-buildpack.git 4. https://github.com/cyberdelia/heroku-geo-buildpack.git#1.3 但是部署失败了,因为在 Heroku 可以获取它运行的新 buildpack 之前

python manage.py collectstatic 并且不会继续进行。那么是否可以手动获取新的构建包然后触发部署。

【问题讨论】:

    标签: heroku geodjango heroku-toolbelt


    【解决方案1】:

    我使用基本相同的构建包,但是顺序很重要。你会希望 Python buildpack 在最后,因为它决定了 collectstatic 应该运行。

    这些是我使用的构建包及其顺序:

    1. https://github.com/beanieboi/nginx-buildpack.git
    2. https://github.com/cyberdelia/heroku-geo-buildpack.git#1.3
    3. https://github.com/heroku/heroku-buildpack-pgbouncer
    4. https://github.com/heroku/heroku-buildpack-python#v69

    如果这不起作用,您还可以使用环境变量禁用 collectstatic:https://devcenter.heroku.com/articles/django-assets#disabling-collectstatic。不过,您需要在部署后手动运行 collectstatic 或将其作为 Procfile 的一部分。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2010-12-16
      • 1970-01-01
      • 2012-02-23
      • 2012-02-10
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多