Skip to content

Instantly share code, notes, and snippets.

@tvdeyen
Created Nov 3, 2016
Embed
What would you like to do?
AlchemyCMS deployment with Capistrano
require 'capistrano/setup'
require 'capistrano/deploy'
require 'capistrano/bundler'
require 'capistrano/rails/assets'
require 'capistrano/rails/migrations'
require 'capistrano/alchemy'
# Load custom tasks from `lib/capistrano/tasks` if you have any defined
Dir.glob('lib/capistrano/tasks/*.rake').each { |r| import r }
# config/deploy.rb
set :application, 'my-app'
set :repo_url, 'git@github.com:user/repo.git'
set :deploy_to, '/var/www/htdocs'
set :linked_files, fetch(:linked_files, []).push('config/database.yml', 'config/secrets.yml')
set :linked_dirs, fetch(:linked_dirs, []).push('log', 'tmp/pids', 'tmp/cache', 'tmp/sockets', 'vendor/bundle')
source 'https://rubygems.org'
...
gem 'capistrano-alchemy', github: 'AlchemyCMS/capistrano-alchemy', branch: 'master', group: :development
...
# config/deploy/production.rb
server 'XX.XXX.XX.XXX', user: 'username', roles: %w{app db web}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment