Configure deployment Capistrano dotenv

This commit is contained in:
Jesse C. Fisher 2015-08-21 02:41:59 -07:00
parent 1fac363900
commit 7b1c775822
9 changed files with 35 additions and 29 deletions

View File

@ -7,7 +7,6 @@ require 'capistrano/deploy'
require 'capistrano/puma' require 'capistrano/puma'
require 'capistrano/puma/workers' require 'capistrano/puma/workers'
require 'capistrano/puma/jungle' require 'capistrano/puma/jungle'
require 'capistrano/puma/monit'
require 'capistrano/rbenv' require 'capistrano/rbenv'
require 'capistrano/bundler' require 'capistrano/bundler'
require 'capistrano/nginx' require 'capistrano/nginx'

View File

@ -18,6 +18,7 @@ gem 'puma'
gem 'pundit' gem 'pundit'
gem 'simple_form' gem 'simple_form'
gem 'upmin-admin' gem 'upmin-admin'
gem 'dotenv-rails'
group :development do group :development do
gem 'better_errors' gem 'better_errors'
gem 'rubocop', require: false gem 'rubocop', require: false
@ -32,7 +33,6 @@ 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 'foreman'
gem 'guard-bundler' gem 'guard-bundler'
gem 'guard-rails' gem 'guard-rails'
gem 'guard-rspec' gem 'guard-rspec'

View File

@ -97,6 +97,10 @@ GEM
actionmailer (>= 3.2.6, < 5) actionmailer (>= 3.2.6, < 5)
devise (>= 3.2.0) devise (>= 3.2.0)
diff-lcs (1.2.5) diff-lcs (1.2.5)
dotenv (2.0.2)
dotenv-rails (2.0.2)
dotenv (= 2.0.2)
railties (~> 4.0)
erubis (2.7.0) erubis (2.7.0)
execjs (2.6.0) execjs (2.6.0)
factory_girl (4.5.0) factory_girl (4.5.0)
@ -107,8 +111,6 @@ GEM
faker (1.5.0) faker (1.5.0)
i18n (~> 0.5) i18n (~> 0.5)
ffi (1.9.10) ffi (1.9.10)
foreman (0.78.0)
thor (~> 0.19.1)
formatador (0.2.5) formatador (0.2.5)
guard (2.13.0) guard (2.13.0)
formatador (>= 0.2.4) formatador (>= 0.2.4)
@ -355,9 +357,9 @@ DEPENDENCIES
database_cleaner database_cleaner
devise devise
devise_invitable devise_invitable
dotenv-rails
factory_girl_rails factory_girl_rails
faker faker
foreman
guard-bundler guard-bundler
guard-ctags-bundler guard-ctags-bundler
guard-rails guard-rails

16
bin/dotenv Executable file
View File

@ -0,0 +1,16 @@
#!/usr/bin/env ruby
#
# This file was generated by Bundler.
#
# The application 'dotenv' is installed as part of a gem, and
# this file is here to facilitate running it.
#
require 'pathname'
ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
Pathname.new(__FILE__).realpath)
require 'rubygems'
require 'bundler/setup'
load Gem.bin_path('dotenv', 'dotenv')

View File

@ -1,8 +1,4 @@
#!/usr/bin/env ruby #!/usr/bin/env ruby
begin
load File.expand_path("../spring", __FILE__)
rescue LoadError
end
# #
# This file was generated by Bundler. # This file was generated by Bundler.
# #

View File

@ -1,8 +1,4 @@
#!/usr/bin/env ruby #!/usr/bin/env ruby
begin
load File.expand_path("../spring", __FILE__)
rescue LoadError
end
# #
# This file was generated by Bundler. # This file was generated by Bundler.
# #

View File

@ -1,8 +1,4 @@
#!/usr/bin/env ruby #!/usr/bin/env ruby
begin
load File.expand_path("../spring", __FILE__)
rescue LoadError
end
# #
# This file was generated by Bundler. # This file was generated by Bundler.
# #

View File

@ -1,15 +1,16 @@
#!/usr/bin/env ruby #!/usr/bin/env ruby
#
# This file was generated by Bundler.
#
# The application 'spring' is installed as part of a gem, and
# this file is here to facilitate running it.
#
# This file loads spring without using Bundler, in order to be fast. require 'pathname'
# It gets overwritten when you run the `spring binstub` command. ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
Pathname.new(__FILE__).realpath)
unless defined?(Spring) require 'rubygems'
require "rubygems" require 'bundler/setup'
require "bundler"
if match = Bundler.default_lockfile.read.match(/^GEM$.*?^ (?: )*spring \((.*?)\)$.*?^$/m) load Gem.bin_path('spring', 'spring')
Gem.paths = { "GEM_PATH" => [Bundler.bundle_path.to_s, *Gem.path].uniq }
gem "spring", match[1]
require "spring/binstub"
end
end

View File

@ -15,7 +15,7 @@ set :deploy_to, '/home/jesse/web/thirteen-tien-len'
# set :log_level, :debug # set :log_level, :debug
# set :pty, true # set :pty, true
set :linked_files, %w{config/database.yml config/application.yml db/data.yml} set :linked_files, %w{config/database.yml .env}
set :linked_dirs, %w{bin log tmp/pids tmp/cache tmp/sockets vendor/bundle public/system public/lift-calculator} set :linked_dirs, %w{bin log tmp/pids tmp/cache tmp/sockets vendor/bundle public/system public/lift-calculator}
set :rbenv_type, :user # or :system, depends on your rbenv setup set :rbenv_type, :user # or :system, depends on your rbenv setup