Skip to content

Instantly share code, notes, and snippets.

@pmeinhardt
Created April 18, 2018 13:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pmeinhardt/2ca7a906fc82d6e0114d2d3932b0effe to your computer and use it in GitHub Desktop.
Save pmeinhardt/2ca7a906fc82d6e0114d2d3932b0effe to your computer and use it in GitHub Desktop.
capistrano config for geordi defect
require 'capistrano/setup'
require 'capistrano/deploy'
require 'capistrano/scm/git'
install_plugin Capistrano::SCM::Git
require 'capistrano/bundler'
require 'capistrano/yarn'
require 'capistrano/rails/assets'
require 'capistrano/rails/migrations'
require 'capistrano/passenger'
# config/deploy.rb
lock '~> 3.10.1'
set :application, 'example'
set :repo_url, 'git@github.com:xyz/example.git'
append :linked_files, 'config/database.yml', 'config/secrets.yml'
append :linked_dirs, 'log', 'tmp', 'storage', 'public/system'
# config/deploy/staging.rb
set :branch, 'staging'
set :rails_env, 'staging'
set :deploy_to, '/var/www/project_s'
server 'c1.example.org',
user: 'deploy-s',
roles: %w[app web cron db],
primary: true
server 'c2.example.org',
user: 'deploy-s',
roles: %w[app web]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment