How to deploy Git (BitBucket) Capistrano to root directory

0 votes

I have setup Bitbucket & Capistrano and are testing deploying to remote servers but I am unable 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, "git@bitbucket.org:*****.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

Can anyone help me with this?

thanks

Jul 12, 2018 in Git & GitHub by Atul
• 10,200 points
61 views

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
0 votes

Here is what you should do.. 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, "git@bitbucket.org:*****.git"
# Default value for keep_releases is 5
set :keep_releases, 2
set :deploy_to, "/var/www/html/web_app"
answered Jul 12, 2018 by Damon Salvatore
• 5,250 points

Related Questions In Git & GitHub

0 votes
1 answer

How to do a re-merge into another branch in git

Seems like you want to rebase your ...READ MORE

answered May 7, 2018 in Git & GitHub by DareDev
• 6,520 points
58 views
0 votes
1 answer
0 votes
1 answer

How to view the nested workflow of a local git repository?

The ‘git log’ command is your closest ...READ MORE

answered Jul 4, 2018 in Git & GitHub by Sophie may
• 9,050 points
38 views
0 votes
1 answer

How to solve the ‘Git commit -a error’?

This happens when no editor is set. ...READ MORE

answered Jul 5, 2018 in Git & GitHub by Tyrion anex
• 8,280 points
29 views
0 votes
1 answer

How to forcefully commit a file to Git even if the file is ruled as unchanged?

This is simple, just follow the below ...READ MORE

answered Jul 11, 2018 in Git & GitHub by Sophie may
• 9,050 points
21 views
0 votes
1 answer

Is there a way to remove a directory from git repository?

This is simple, just follow the commands ...READ MORE

answered Jul 13, 2018 in Git & GitHub by Sophie may
• 9,050 points
21 views
+13 votes
2 answers
0 votes
1 answer

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.