Commit 8bb48790379265c773c5ca8f3a1888f905b82709
1 parent
98d52608
Exists in
colab
and in
4 other branches
New deploy
Showing
3 changed files
with
28 additions
and
18 deletions
Show diff stats
Gemfile
| ... | ... | @@ -39,6 +39,9 @@ gem 'devise', '~> 3.0.0' |
| 39 | 39 | # Kalibro integration |
| 40 | 40 | gem 'kalibro_entities', git: 'https://github.com/mezuro/kalibro_entities.git' #When the first version of KalibroEntities come out, do not keep using the git repository |
| 41 | 41 | |
| 42 | +#PostgreSQL integration | |
| 43 | +gem "pg", "~> 0.16.0" | |
| 44 | + | |
| 42 | 45 | group :doc do |
| 43 | 46 | # bundle exec rake doc:rails generates the API under doc/api. |
| 44 | 47 | gem 'sdoc', require: false | ... | ... |
Gemfile.lock
| ... | ... | @@ -120,6 +120,7 @@ GEM |
| 120 | 120 | nokogiri (1.5.10) |
| 121 | 121 | nori (2.3.0) |
| 122 | 122 | orm_adapter (0.4.0) |
| 123 | + pg (0.16.0) | |
| 123 | 124 | polyglot (0.3.3) |
| 124 | 125 | rack (1.5.2) |
| 125 | 126 | rack-test (0.6.2) |
| ... | ... | @@ -227,6 +228,7 @@ DEPENDENCIES |
| 227 | 228 | kalibro_entities! |
| 228 | 229 | mocha |
| 229 | 230 | modernizr-rails |
| 231 | + pg (~> 0.16.0) | |
| 230 | 232 | rails (= 4.0.0) |
| 231 | 233 | rspec-rails |
| 232 | 234 | rvm-capistrano | ... | ... |
config/deploy.rb
| 1 | 1 | require "rvm/capistrano" |
| 2 | 2 | require 'bundler/capistrano' |
| 3 | 3 | |
| 4 | +set :default_shell, "/bin/bash -l" | |
| 5 | +set :rails_env, "production" | |
| 6 | + | |
| 4 | 7 | set :rvm_ruby_string, :local # use the same ruby as used locally for deployment |
| 5 | 8 | set :rvm_autolibs_flag, "read-only" # more info: rvm help autolibs |
| 6 | -set :rvm_type, :system | |
| 7 | - | |
| 8 | -#before 'deploy:setup', 'rvm:install_rvm' # install RVM | |
| 9 | -#before 'deploy:setup', 'rvm:install_ruby' # install Ruby and create gemset, OR: # before 'deploy:setup', 'rvm:create_gemset' # only create gemset | |
| 9 | +#set :rvm_type, :system | |
| 10 | 10 | |
| 11 | 11 | set :application, "mezuro" |
| 12 | 12 | set :deploy_to, "/home/mezuro/app" |
| ... | ... | @@ -18,21 +18,26 @@ set :use_sudo, false |
| 18 | 18 | # set :scm, :git # You can set :scm explicitly or Capistrano will make an intelligent guess based on known version control directory names |
| 19 | 19 | # Or: `accurev`, `bzr`, `cvs`, `darcs`, `git`, `mercurial`, `perforce`, `subversion` or `none` |
| 20 | 20 | |
| 21 | -role :web, "ec2-54-224-143-159.compute-1.amazonaws.com" # Your HTTP server, Apache/etc | |
| 22 | -role :app, "ec2-54-224-143-159.compute-1.amazonaws.com" # This may be the same as your `Web` server | |
| 23 | -role :db, "ec2-54-224-143-159.compute-1.amazonaws.com", :primary => true # This is where Rails migrations will run | |
| 24 | - | |
| 25 | -# if you want to clean up old releases on each deploy uncomment this: | |
| 26 | -# after "deploy:restart", "deploy:cleanup" | |
| 21 | +role :web, "ec2-54-224-114-220.compute-1.amazonaws.com" # Your HTTP server, Apache/etc | |
| 22 | +role :app, "ec2-54-224-114-220.compute-1.amazonaws.com" # This may be the same as your `Web` server | |
| 23 | +role :db, "ec2-54-224-114-220.compute-1.amazonaws.com", :primary => true # This is where Rails migrations will run | |
| 27 | 24 | |
| 28 | -# if you're still using the script/reaper helper you will need | |
| 29 | -# these http://github.com/rails/irs_process_scripts | |
| 25 | +before 'deploy:setup', 'rvm:install_rvm' # install RVM | |
| 26 | +before 'deploy:setup', 'rvm:install_ruby' # install Ruby and create gemset, OR: | |
| 27 | +before 'deploy:setup', 'rvm:create_gemset' # only create gemset | |
| 28 | +after 'deploy:assets:symlink', 'deploy:config_symlinks' | |
| 29 | +after 'deploy:restart', "deploy:cleanup" | |
| 30 | 30 | |
| 31 | -# If you are using Passenger mod_rails uncomment this: | |
| 32 | 31 | namespace :deploy do |
| 33 | - task :start do ; end | |
| 34 | - task :stop do ; end | |
| 35 | - task :restart, :roles => :app, :except => { :no_release => true } do | |
| 36 | - run "#{try_sudo} touch #{File.join(current_path,'tmp','restart.txt')}" | |
| 37 | - end | |
| 32 | + task :start do ; end | |
| 33 | + | |
| 34 | + task :stop do ; end | |
| 35 | + | |
| 36 | + task :restart, :roles => :app, :except => { :no_release => true } do | |
| 37 | + run "#{try_sudo} touch #{File.join(current_path,'tmp','restart.txt')}" | |
| 38 | + end | |
| 39 | + | |
| 40 | + task :config_symlinks do | |
| 41 | + run "ln -s #{File.join(deploy_to, 'shared', 'config/database.yml')} #{File.join(release_path, 'config/database.yml')}" | |
| 42 | + end | |
| 38 | 43 | end |
| 39 | 44 | \ No newline at end of file | ... | ... |