5

使用 Capistrano,我注意到当使用 . 创建符号链接时current -> /var/www/myapp,编译需要很长时间。事实上,我等了大约 5 到 10 分钟并取消了这个过程。

它挂在这部分:

00:09 deploy:assets:precompile
      01 $HOME/.rbenv/bin/rbenv exec bundle exec rake assets:precompile
      01 yarn install v0.27.5
      01 [1/4] Resolving packages...
      01 [2/4] Fetching packages...
      01 warning fsevents@1.1.2: The platform "linux" is incompatible with this module.
      01 info "fsevents@1.1.2" is an optional dependency and failed compatibility check. Excluding it from installation.
      01 [3/4] Linking dependencies...
      01 [4/4] Building fresh packages...

如果我删除current符号链接,它仍然需要一段时间,但它完成了。

00:09 deploy:assets:precompile
      01 $HOME/.rbenv/bin/rbenv exec bundle exec rake assets:precompile
      01 yarn install v0.27.5
      01 [1/4] Resolving packages...
      01 [2/4] Fetching packages...
      01 warning fsevents@1.1.2: The platform "linux" is incompatible with this module.
      01 info "fsevents@1.1.2" is an optional dependency and failed compatibility check. Excluding it from installation.
      01 [3/4] Linking dependencies...
      01 [4/4] Building fresh packages...
      01 Done in 134.00s.
      01 Webpacker is installed  
      01 Using /var/www/html/myapp/releases/20170713104316/config/webpacker.yml file for setting up webpack paths
      01 [Webpacker] Compiling assets 
      01 [Webpacker] Compiled digests for all packs in /var/www/html/myapp/releases/20170713104316/app/javascript/packs:
      01 {"application.css"=>"/packs/application.css", "application.css.map"=>"/packs/application.css.map", "application.js"=>"/packs/application-54a7cd537f4d8d13646…

花了大约 134 秒。

第一次使用Capistrano和webpacker进行部署,正常还是有减少编译时间的办法?

4

0 回答 0