Reputation: 75
Can someone help with this, I've setup Bitbucket & Capistrano and are testing deploying to remote servers but I can't get it to deploy to a root directory, I've looked around but can't seem to find a way to change it.
e.g. /var/www/html/web_app/
but i get this
e.g. /var/www/html/releases/20161028093829
Any ideas. Thanks in advance.
version "3.6.1"
deploy.rb
set :application, "hunter"
set :repo_url, "[email protected]:*****.git"
# Default value for keep_releases is 5
set :keep_releases, 2
CAPFILE
require "capistrano/setup"
require "capistrano/rsync"
require "capistrano/deploy"
require "capistrano/scm/git" install_plugin Capistrano::SCM::Git
Dir.glob("lib/capistrano/tasks/*.rake").each { |r| import r }
Rake::Task[:production].invoke
Upvotes: 1
Views: 415
Reputation: 2473
The parameter responsible for defining the directory to deploy to is :deploy_to
. So, in order to your Capistrano to deploy to /var/www/html/web_app/
you need to configure it accordingly.
Below set :keep_releases, 2
set the :deploy_to
param to /var/www/html/web_app/
. Your deploy.rb file will look like this:
set :application, "hunter"
set :repo_url, "[email protected]:*****.git"
# Default value for keep_releases is 5
set :keep_releases, 2
set :deploy_to, "/var/www/html/web_app"
Upvotes: 1