Created
November 3, 2016 09:57
-
-
Save tvdeyen/31e02dd224c35e35281cf097f65ed6c8 to your computer and use it in GitHub Desktop.
AlchemyCMS deployment with Capistrano
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
source 'https://rubygems.org' | |
... | |
gem 'capistrano-alchemy', github: 'AlchemyCMS/capistrano-alchemy', branch: 'master', group: :development | |
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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