Add capistrano-postgresql gem. Update production deploy
This commit is contained in:
parent
ae85c90730
commit
4ac48fa07d
1
Capfile
1
Capfile
@ -12,6 +12,7 @@ require 'capistrano/bundler'
|
|||||||
require 'capistrano/nginx'
|
require 'capistrano/nginx'
|
||||||
require 'capistrano/rails/assets'
|
require 'capistrano/rails/assets'
|
||||||
require 'capistrano/rails/migrations'
|
require 'capistrano/rails/migrations'
|
||||||
|
require 'capistrano/postgresql'
|
||||||
#require 'capistrano/bower'
|
#require 'capistrano/bower'
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
1
Gemfile
1
Gemfile
@ -34,6 +34,7 @@ group :development do
|
|||||||
gem 'capistrano-rbenv'
|
gem 'capistrano-rbenv'
|
||||||
gem 'capistrano-nginx', github: 'koenpunt/capistrano-nginx'
|
gem 'capistrano-nginx', github: 'koenpunt/capistrano-nginx'
|
||||||
gem "capistrano-db-tasks", require: false
|
gem "capistrano-db-tasks", require: false
|
||||||
|
gem "capistrano-postgresql", '~> 4.2.0'
|
||||||
gem 'guard-bundler'
|
gem 'guard-bundler'
|
||||||
gem 'guard-rails'
|
gem 'guard-rails'
|
||||||
gem 'guard-rspec'
|
gem 'guard-rspec'
|
||||||
|
|||||||
@ -60,6 +60,8 @@ GEM
|
|||||||
sshkit (~> 1.2)
|
sshkit (~> 1.2)
|
||||||
capistrano-db-tasks (0.4)
|
capistrano-db-tasks (0.4)
|
||||||
capistrano (>= 3.0.0)
|
capistrano (>= 3.0.0)
|
||||||
|
capistrano-postgresql (4.2.1)
|
||||||
|
capistrano (>= 3.0)
|
||||||
capistrano-rails (1.1.5)
|
capistrano-rails (1.1.5)
|
||||||
capistrano (~> 3.1)
|
capistrano (~> 3.1)
|
||||||
capistrano-bundler (~> 1.1)
|
capistrano-bundler (~> 1.1)
|
||||||
@ -380,6 +382,7 @@ DEPENDENCIES
|
|||||||
capistrano-bundler
|
capistrano-bundler
|
||||||
capistrano-db-tasks
|
capistrano-db-tasks
|
||||||
capistrano-nginx!
|
capistrano-nginx!
|
||||||
|
capistrano-postgresql (~> 4.2.0)
|
||||||
capistrano-rails
|
capistrano-rails
|
||||||
capistrano-rails-console
|
capistrano-rails-console
|
||||||
capistrano-rbenv
|
capistrano-rbenv
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
set :application, 'thirteen-tien-len'
|
set :application, "thirteen_tien_len_#{fetch(:stage)}"
|
||||||
set :repo_url, 'git@bitbucket.org:jessecfisher/thirteen-tien-len.git'
|
set :repo_url, 'git@bitbucket.org:jessecfisher/thirteen-tien-len.git'
|
||||||
|
|
||||||
# If you want to import assets, you can change default asset dir (default = system)
|
# If you want to import assets, you can change default asset dir (default = system)
|
||||||
@ -34,6 +34,9 @@ set :nginx_template, 'config/deploy/nginx_conf.erb' # configuration template
|
|||||||
set :nginx_listen, 80 # optional, default is not set
|
set :nginx_listen, 80 # optional, default is not set
|
||||||
set :nginx_roles, :all
|
set :nginx_roles, :all
|
||||||
|
|
||||||
|
## postgresql
|
||||||
|
#set :pg_user, "thirteen_tien_len_#{fetch(:stage)}"
|
||||||
|
|
||||||
namespace :db do
|
namespace :db do
|
||||||
desc 'Setup the database'
|
desc 'Setup the database'
|
||||||
task :setup do
|
task :setup do
|
||||||
|
|||||||
@ -1,15 +1,15 @@
|
|||||||
set :stage, :production
|
set :stage, :production
|
||||||
|
|
||||||
set :nginx_server_name, 'thirteen.cowabon.ga' # optional, defaults to :application
|
set :nginx_server_name, 'tienlen.ga' # optional, defaults to :application
|
||||||
|
|
||||||
# Simple Role Syntax
|
# Simple Role Syntax
|
||||||
# ==================
|
# ==================
|
||||||
# Supports bulk-adding hosts to roles, the primary
|
# Supports bulk-adding hosts to roles, the primary
|
||||||
# server in each group is considered to be the first
|
# server in each group is considered to be the first
|
||||||
# unless any hosts have the primary property set.
|
# unless any hosts have the primary property set.
|
||||||
role :app, %w{jesse@ssh.cowabon.ga}
|
role :app, %w{jesse@tienlen.ga}
|
||||||
role :web, %w{jesse@ssh.cowabon.ga}
|
role :web, %w{jesse@tienlen.ga}
|
||||||
role :db, %w{jesse@ssh.cowabon.ga}
|
role :db, %w{jesse@tienlen.ga}
|
||||||
|
|
||||||
# Extended Server Syntax
|
# Extended Server Syntax
|
||||||
# ======================
|
# ======================
|
||||||
@ -17,7 +17,7 @@ role :db, %w{jesse@ssh.cowabon.ga}
|
|||||||
# definition into the server list. The second argument
|
# definition into the server list. The second argument
|
||||||
# something that quacks like a hash can be used to set
|
# something that quacks like a hash can be used to set
|
||||||
# extended properties on the server.
|
# extended properties on the server.
|
||||||
server 'ssh.cowabon.ga', user: 'jesse', roles: %w{web app db}, my_property: :my_value
|
server 'tienlen.ga', user: 'jesse', roles: %w{web app db}, my_property: :my_value
|
||||||
|
|
||||||
# you can set custom ssh options
|
# you can set custom ssh options
|
||||||
# it's possible to pass any option but you need to keep in mind that net/ssh understand limited list of options
|
# it's possible to pass any option but you need to keep in mind that net/ssh understand limited list of options
|
||||||
@ -27,7 +27,7 @@ server 'ssh.cowabon.ga', user: 'jesse', roles: %w{web app db}, my_property: :my_
|
|||||||
# keys: %w(/home/rlisowski/.ssh/id_rsa),
|
# keys: %w(/home/rlisowski/.ssh/id_rsa),
|
||||||
# forward_agent: false,
|
# forward_agent: false,
|
||||||
# auth_methods: %w(password)
|
# auth_methods: %w(password)
|
||||||
port: 27997
|
# port: 27997
|
||||||
}
|
}
|
||||||
# and/or per server
|
# and/or per server
|
||||||
# server 'example.com',
|
# server 'example.com',
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user