使用Mina部署子目录

编程入门 行业动态 更新时间:2024-10-14 06:21:44
本文介绍了使用Mina部署子目录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

是否可以通过Mina部署仓库的子目录?我见过有人使用Capistrano使用自定义部署策略来实现这一目标,而我希望能够通过Mina来实现。

Is there a way to deploy a subdirectory of the repo through Mina? I've seen people using custom deploy strategy to achieve this with Capistrano and I would like to be able to do it with Mina.

推荐答案

我能够通过将许多setp包装在 in_directory'./rails'do end 这样的代码块(我的rails应用程序位于 rails 目录下):

I was able to fix this by wrapping a number of the setps in a in_directory './rails' do end block like this (my rails app is under the rails directory):

task :deploy => :environment do deploy do # stop accepting new workers invoke :'sidekiq:quiet' # Put things that will set up an empty directory into a fully set-up # instance of your project. invoke :'git:clone' in_directory './rails' do invoke :'deploy:link_shared_paths' invoke :'bundle:install' invoke :'rails:db_migrate' invoke :'deploy:cleanup' end to :launch do in_directory './rails' do #invoke :'sidekiq:restart' invoke :'unicorn:restart' end end end end

更多推荐

使用Mina部署子目录

本文发布于:2023-11-01 13:21:53,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1549434.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:子目录   Mina

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!