【发布时间】:2016-02-19 05:01:14
【问题描述】:
我在 Heroku 上运行一个中间人站点,并使用 Contentful 来管理内容。我想使用 Contentful 的 webhook,并已将我的应用设置为使用 contentful_middleman gem 的新 webhook 选项(在 master 分支上)。
它通过在“/receive”上收到 webhook 通知时运行“middleman contentful --rebuild”来重建资产。
由于它的临时文件系统,这个流程在 heroku 上注定要失败吗?从下面的日志来看,似乎是这样。
如果是这样,是否有一种 Heroku 友好的方式可以在中间人应用程序启动后重建它?或者我是否需要切换平台才能以这种方式使用内容丰富的 webhook?
2015-11-16T21:42:05.776622+00:00 app[web.1]: 缓存: [POST /receive] pass
2015-11-16T21:42:35.818683+00:00 heroku[router]: at=info method=POST path="/receive" host=www.mysite.com request_id=some_id fwd="ip, another ip" dyno= web.1 连接=0ms 服务=13ms 状态=405 字节=367
2015-11-16T21:42:35.849264+00:00 app[web.1]:/app/vendor/ruby-2.0.0/lib/ruby/2.0.0/fileutils.rb:203:in each'
2015-11-16T21:42:35.849253+00:00 app[web.1]: cache error: Read-only file system - /var/cache
2015-11-16T21:42:35.849435+00:00 app[web.1]: cache: [POST /receive] pass
2015-11-16T21:42:35.849281+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/puma-2.11.3/lib/puma/thread_pool.rb:104:incall '
2015-11-16T21:42:35.849268+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/rack-cache-1.2/lib/rack/cache/storage.rb :37:在create_store'
2015-11-16T21:42:35.849270+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/rack-cache-1.2/lib/rack/cache/context.rb:149:ininvalidate'
2015-11-16T21:42:35.849279+00:00 app[web.1]:/app/vendor/bundle/ruby/2.0.0/gems/puma-2.11.3/lib/puma/configuration.rb:51 :在call'
2015-11-16T21:42:35.849265+00:00 app[web.1]: /app/vendor/ruby-2.0.0/lib/ruby/2.0.0/fileutils.rb:203:inmkdir_p'
2015-11-16T21:42:35.849257+00:00 app[web.1]:/app/vendor/ruby-2.0.0/lib/ruby/2.0.0/fileutils.rb:242:in fu_mkdir'
2015-11-16T21:42:35.849267+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/rack-cache-1.2/lib/rack/cache/metastore.rb:261:innew '
2015-11-16T21:42:35.849277+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/rack-cache-1.2/lib/rack/cache/context.rb :51:in call'
2015-11-16T21:42:35.849280+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/puma-2.11.3/lib/puma/server.rb:262:inblock in run'
2015-11-16T21:42:35.849256+00:00 app[web.1]:/app/vendor/ruby-2.0.0/lib/ruby/2.0.0/fileutils.rb:242:in mkdir'
2015-11-16T21:42:35.849259+00:00 app[web.1]: /app/vendor/ruby-2.0.0/lib/ruby/2.0.0/fileutils.rb:219:inblock (2 级)在 mkdir_p'
2015-11-16T21:42:35.849266+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/rack-cache-1.2/lib/rack/cache/metastore.rb :218:in initialize'
2015-11-16T21:42:35.849280+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/puma-2.11.3/lib/puma/server.rb:375:inprocess_client'
2015-11-16T21:42:35.849263+00:00 app[web.1]:/app/vendor/ruby-2.0.0/lib/ruby/2.0.0/fileutils.rb:217:in reverse_each'
2015-11-16T21:42:35.849263+00:00 app[web.1]: /app/vendor/ruby-2.0.0/lib/ruby/2.0.0/fileutils.rb:217:inblock在 mkdir_p'
2015-11-16T21:42:35.849269+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/rack-cache-1.2/lib/rack/cache/storage.rb :18:in resolve_metastore_uri'
2015-11-16T21:42:35.849276+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/rack-cache-1.2/lib/rack/cache/context.rb:71:incall!'
2015-11-16T21:42:35.849282+00:00 app[web.1]:/app/vendor/bundle/ruby/2.0.0/gems/puma-2.11.3/lib/puma/thread_pool.rb:104 :在block in spawn_thread'
2015-11-16T21:42:35.849267+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/rack-cache-1.2/lib/rack/cache/metastore.rb:261:inresolve'
2015-11-16T21:42:35.849269+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/rack-cache-1.2/lib/rack/cache/context.rb :34:在metastore'
2015-11-16T21:42:35.849278+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/rack-ssl-1.4.1/lib/rack/ssl.rb:27:incall'
2015-11-16T21:42:35.849279+00:00 app[web.1]:/app/vendor/bundle/ruby/2.0.0/gems/puma-2.11.3/lib/puma/server.rb:507 :in `handle_request'
【问题讨论】:
标签: heroku middleman contentful