我在 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]:cache:[POST /receive] pass 2015-11-16T21:42:35.818683+00:00 heroku[router]:at=info 方法=POST path="/receive" host=www.mysite.com request_id=some_id fwd="ip, another ip" dyno=web.1 connect=0ms service=13ms status=405 bytes=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:in
call' 2015-11-16T21:42:35.849268 +00:00 应用程序 [web.1]:/app/vendor/bundle/ruby/2.0.0/gems/rack-cache-1.2/lib/rack/cache/storage.rb:37:increate_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:in
无效' 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:in 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:in
mkdir_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:infu_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:in
新的' 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:in
block 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:in
block (2 levels) in 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:in
process_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:in
block in 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:inresolve_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:in
称呼!' 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 :in 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:in
resolve' 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:in 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:in
call' 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'