Cap setup
This commit is contained in:
20
config/deploy.rb
Normal file
20
config/deploy.rb
Normal file
@@ -0,0 +1,20 @@
|
||||
lock "3.10.1"
|
||||
|
||||
set :application, "sxrestaurant"
|
||||
set :repo_url, 'git@bitbucket.org:code2lab/sxrestaurant.git'
|
||||
|
||||
set :deploy_user, 'deploy'
|
||||
|
||||
set :rbenv_type, :global
|
||||
set :rbenv_prefix, "RBENV_ROOT=#{fetch(:rbenv_path)} RBENV_VERSION=#{fetch(:rbenv_ruby)} #{fetch(:rbenv_path)}/bin/rbenv exec"
|
||||
|
||||
set :rbenv_map_bins, %w{rake gem bundle ruby rails}
|
||||
|
||||
set :keep_releases, 5
|
||||
|
||||
set :linked_files, %w{config/database.yml config/secrets.yml config/puma.rb config/sidekiq.yml}
|
||||
|
||||
set :linked_dirs, %w{bin log tmp/puma tmp/pids tmp/cache tmp/sockets vendor/bundle public/system pids sockets}
|
||||
|
||||
set :tests, []
|
||||
set :pty, true
|
||||
9
config/deploy/production.rb
Normal file
9
config/deploy/production.rb
Normal file
@@ -0,0 +1,9 @@
|
||||
set :stage, :production
|
||||
set :server_name, "svr.sxrestaurant.host"
|
||||
|
||||
set :full_app_name, "#{fetch(:application)}_#{fetch(:stage)}"
|
||||
server '192.168.1.27', user: 'deploy', roles: %w{web app db}, primary: true
|
||||
|
||||
set :deploy_to, "/home/#{fetch(:deploy_user)}/apps/#{fetch(:full_app_name)}"
|
||||
set :rbenv_ruby, '2.4.0'
|
||||
set :rails_env, :production
|
||||
Reference in New Issue
Block a user