1
votes

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

1
Post some of your environment configuration so we can help you better. Which version of Capistrano are you using? Probably it is a misconfiguration of :deploy_to (capistranorb.com/documentation/getting-started/structure) - alejdg
Thanks you alejdg.....See above - Christian Watts
Did you have any success? - alejdg

1 Answers

1
votes

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"