Skip to content

Instantly share code, notes, and snippets.

Created November 15, 2016 17:20
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 anonymous/8c800712b455e8d7d123f6e4b7e99fc9 to your computer and use it in GitHub Desktop.
Save anonymous/8c800712b455e8d7d123f6e4b7e99fc9 to your computer and use it in GitHub Desktop.
# Load DSL and set up stages
require "capistrano/setup"
# Include default deployment tasks
require "capistrano/deploy"
# Include tasks from other gems included in your Gemfile
#
# For documentation on these, see for example:
#
# https://github.com/capistrano/rvm
# https://github.com/capistrano/rbenv
# https://github.com/capistrano/chruby
# https://github.com/capistrano/bundler
# https://github.com/capistrano/rails
# https://github.com/capistrano/passenger
#
# require 'capistrano/rvm'
require 'capistrano/rbenv'
set :rbenv_ruby, '2.3.1'
# require 'capistrano/chruby'
require 'capistrano/bundler'
require 'capistrano/rails'
require 'capistrano/passenger'
# Load custom tasks from `lib/capistrano/tasks` if you have any defined
Dir.glob("lib/capistrano/tasks/*.rake").each { |r| import r }
server "app.example.com", user: "smith", roles: %w{web, app, db}, port: 3488
set :assets_roles, [:app, :web]
set :application, "myapp"
set :rails_env, "production"
set :scm, :git
set :pty, true
set :application, 'myapp'
set :repo_url, 'git@bitbucket.org:user/app.git'
set :linked_files, fetch(:linked_files, []).push('config/database.yml', 'config/secrets.yml', 'db/staging.sqlite3', 'db/production.sqlite3')
set :linked_dirs, fetch(:linked_dirs, []).push('log', 'tmp/pids', 'tmp/cache', 'tmp/sockets', 'vendor/bundle', 'public/system', 'public/uploads')
set :passenger_restart_with_touch, true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment