diff options
author | elijah <elijah@riseup.net> | 2015-04-26 14:40:38 -0700 |
---|---|---|
committer | elijah <elijah@riseup.net> | 2015-04-26 14:40:38 -0700 |
commit | 06ceabbbfa28eb812bfeb1007b30e3f797850c25 (patch) | |
tree | 4c61f2f78bd36f0acbbc78ff55bbf5e7745c656f | |
parent | 783be829afc2791c71488068f166f38f8a39a9d3 (diff) |
added capistrano configs.
-rw-r--r-- | Capfile | 8 | ||||
-rw-r--r-- | README.md | 13 | ||||
-rw-r--r-- | config/deploy.rb | 36 | ||||
-rw-r--r-- | config/deploy/production.rb | 8 |
4 files changed, 64 insertions, 1 deletions
@@ -0,0 +1,8 @@ +require 'capistrano/setup' +require 'capistrano/deploy' + +# +# this will allow you to run `cap deploy` +# instead of `cap production deploy`. +# +invoke :production @@ -9,5 +9,16 @@ render the source files into html files. To submit changes, please fork this repo and issue pull requests on github. -For more information how to use `amber`, see: https://github.com/leapcode/amber. +For more information how to use `amber`, see: +https://github.com/leapcode/amber. +For now, there is no post-commit hook on this repo that automatically triggers +an update to the website. To deploy the current version: + + sudo gem install capistrano + git clone https://leap.se/git/leap_se + cd leap_se + cap deploy + +This will deploy directly from master branch of https://leap.se/git/leap_se +(in other words, local changes are not deployed).
\ No newline at end of file diff --git a/config/deploy.rb b/config/deploy.rb new file mode 100644 index 0000000..d4f50e5 --- /dev/null +++ b/config/deploy.rb @@ -0,0 +1,36 @@ +set :application, "leap_se" +set :deploy_to, "/home/website/leap-website" +set :scm, :git +set :repo_url, "https://leap.se/git/leap_se" +set :branch, "master" +set :deploy_via, :remote_cache +set :use_sudo, false +set :keep_releases, 2 + +# use system gems: +set :default_environment, { + 'GEM_PATH' => '', + 'GEM_HOME' => '' +} + +namespace :leap do + task :link_to_chiliproject do + on roles(:all) do |host| + execute "rm -f #{current_path}/public/code" + execute "ln -s /var/www/redmine/public #{current_path}/public/code" + end + end +end + +namespace :amber do + task :rebuild do + on roles(:all) do |host| + within release_path do + execute :amber, 'rebuild' + end + end + end +end + +after "deploy:updated", "amber:rebuild" +before "deploy:published", "leap:link_to_chiliproject" diff --git a/config/deploy/production.rb b/config/deploy/production.rb new file mode 100644 index 0000000..6c9a2c8 --- /dev/null +++ b/config/deploy/production.rb @@ -0,0 +1,8 @@ +server 'hare.leap.se', + roles:['app'], + user:'website', + port: 22, + ssh_options: { + auth_methods: ['publickey'], + forward_agent: false + } |