加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

ruby-on-rails – 在使用capistrano和svn部署rails时,在哪里放置

发布时间:2020-12-17 04:22:00 所属栏目:百科 来源:网络整理
导读:我有两个配置文件 /app/config/database.yml 和 /app/config/userconfig.yml 我不想将数据库凭据和userconfig放在svn-repository中,所以我签入了database.yml.dist和userconfig.yml.dist. 在第一次部署应用程序时,在共享目录中获取dist文件的copys的最佳方法
我有两个配置文件
/app/config/database.yml

/app/config/userconfig.yml

我不想将数据库凭据和userconfig放在svn-repository中,所以我签入了database.yml.dist和userconfig.yml.dist.

在第一次部署应用程序时,在共享目录中获取dist文件的copys的最佳方法是什么?

对于以后的部署,我将从/ app / current / config链接到它们

解决方法

您应该将配置文件放入
/path/to/deployed_app/shared

然后在capistrano任务中,sym链接到这些文件:

namespace :deploy do
  task :symlink_shared do
    run "ln -s #{shared_path}/database.yml #{release_path}/config/"
  end
end

before "deploy:restart","deploy:symlink_shared"

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读