问题描述
我正在使用Capistrano 3通过我的Rails应用进行部署。问题在于,每次将应用程序部署到服务器时,。/ log / production.log文件都会重置。我听说有可能将production.log文件放到共享文件夹中,并在每次部署后附加。
I'm using Capistrano 3 for deployment with my Rails app. The problem is that every time I deploy my app to the server the ./log/production.log file is reset. I've heard it's possible to have the production.log file into the shared folder and being appended at each deployment.
我认为这是Capistrano的默认设置,但显然不适合我:(
I thought this was made by default by Capistrano but apparently not for me :(
有什么想法吗?
谢谢!
推荐答案
在您的config / deploy.rb文件中,您需要类似于以下内容的行:
In your config/deploy.rb you need a line similar to this:
set :linked_dirs, %w{log public/system}
这将告诉capistrano将 log
和 public /系统
部署到共享目录中。
This will tell capistrano to symlink log
and public/system
into the shared directory on deployment.
这篇关于Rails Capistrano 3-如何将production.log文件共享到Capistrano的共享文件夹中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!