快速生成mina配置文件, 方便完成mina相关部署
Add this line to your application's Gemfile:
gem 'mina_util', git: "https://github.com/mindpin/mina_util.git"
And then execute:
$ bundle
Or install it yourself as:
$ gem install mina_util
$ rails g mina_utils:install
# 1. 项目名称(用于项目文件路径和配置文件命名,请使用英文火车式命名,比如 hello_world ):
# 2. 服务器域名/IP(用于 mina ssh 连接):
# 3. 服务器用户(默认为root):
# 4. 版本库地址:
# 5. 版本库分支(默认为master):
# 6. 项目地址(默认为/web/#{project_name}):
# 7. nginx配置文件名称(默认为#{project_name}):
$ mina setup
# "=====mongoid配置===="
# 1. mongoid database name(默认为 #{name}):
# 2. mongoid host(默认为localhost):
# 3. mongoid port(默认为27017):
# "=====secrets配置===="
# 4. secrets(默认自动生成):
# "=====nginx配置===="
# 5. 访问域名,例(xx.4ye.me):
# "=====figaro配置===="
# 6+ 会根据config/application.yml.sample 询问所有key的value值。没有文件则跳过。
After checking out the repo, run bin/setup
to install dependencies. You can also run bin/console
for an interactive prompt that will allow you to experiment.
To install this gem onto your local machine, run bundle exec rake install
. To release a new version, update the version number in version.rb
, and then run bundle exec rake release
, which will create a git tag for the version, push git commits and tags, and push the .gem
file to rubygems.org.
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/mina_util. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.
The gem is available as open source under the terms of the MIT License.