docker whenever部署时设置环境

2016-10-25 19:10:29来源:CSDN作者:u012416928人点击

whenever --help
Usage: whenever [options]    -i [identifier],                 Default: full path to schedule.rb file        --update-crontab    -w, --write-crontab [identifier] Default: full path to schedule.rb file    -c, --clear-crontab [identifier]    -s, --set [variables]            Example: --set 'environment=staging&path=/my/sweet/path'    -f, --load-file [schedule file]  Default: config/schedule.rb    -u, --user [user]                Default: current user    -k, --cut [lines]                Cut lines from the top of the cronfile    -r, --roles [role1,role2]        Comma-separated list of server roles to generate cron jobs for    -v, --version

仔细看-s命令

cd /home&&bundle install&&RAILS_ENV=staging bundle exec rake db:migrate&&bundle exec whenever --update-crontab -s environment=staging&&RAILS_ENV=staging bundle exec rake assets:precompile&&puma -e staging

重要代码

bundle exec whenever --update-crontab -s environment=staging

最新文章

123

最新摄影

微信扫一扫

第七城市微信公众平台