summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--config/deploy.rb58
-rw-r--r--db/schema.rb3
2 files changed, 37 insertions, 24 deletions
diff --git a/config/deploy.rb b/config/deploy.rb
index 6384621..fc5e2ac 100644
--- a/config/deploy.rb
+++ b/config/deploy.rb
@@ -1,26 +1,36 @@
+require "bundler/capistrano"
+
set :application, "parley"
+set :user, "demo"
+set :deploy_to, "/home/#{user}/apps/#{application}"
+set :deploy_via, :remote_cache # keeps git repo on server cache
+set :use_sudo, false
+set :scm, "git"
+set :branch, "master"
set :repository, "git@github.com:madebyuppercut/parley.git"
-set :deploy_to, "/home/username/apps/projectname/current/public"
-
-# set :scm, :git # You can set :scm explicitly or Capistrano will make an intelligent guess based on known version control directory names
-# Or: `accurev`, `bzr`, `cvs`, `darcs`, `git`, `mercurial`, `perforce`, `subversion` or `none`
-
-role :web, "your web-server here" # Your HTTP server, Apache/etc
-role :app, "your app-server here" # This may be the same as your `Web` server
-role :db, "your primary db-server here", :primary => true # This is where Rails migrations will run
-role :db, "your slave db-server here"
-
-# if you want to clean up old releases on each deploy uncomment this:
-# after "deploy:restart", "deploy:cleanup"
-
-# if you're still using the script/reaper helper you will need
-# these http://github.com/rails/irs_process_scripts
-
-# If you are using Passenger mod_rails uncomment this:
-# namespace :deploy do
-# task :start do ; end
-# task :stop do ; end
-# task :restart, :roles => :app, :except => { :no_release => true } do
-# run "#{try_sudo} touch #{File.join(current_path,'tmp','restart.txt')}"
-# end
-# end
+
+default_run_options[:pty] = true # password prompt
+ssh_options[:forward_agent] = true # no deploy key for github
+
+# Your HTTP server, Apache/etc
+role :web, "198.199.101.128"
+
+# This may be the same as your `Web` server
+role :app, "198.199.101.128"
+
+# This is where Rails migrations will run
+role :db, "198.199.101.128", primary: true
+#role :db, "your slave db-server here"
+
+after "deploy", "deploy:cleanup" # keep only the last 5 releases
+
+namespace :deploy do
+ task :restart, roles: :app do
+ run "touch #{current_path}/tmp/restart.txt"
+ end
+
+ task :symlink_config, roles: :app do
+ run "ln -nfs #{shared_path}/config/database.yml #{release_path}/config/database.yml"
+ end
+ after "deploy:finalize_update", "deploy:symlink_config"
+end
diff --git a/db/schema.rb b/db/schema.rb
index 19cb362..56feeb7 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -13,6 +13,9 @@
ActiveRecord::Schema.define(version: 20130719165834) do
+ # These are extensions that must be enabled in order to support this database
+ enable_extension "plpgsql"
+
create_table "sign_ups", force: true do |t|
t.string "email"
t.datetime "created_at"