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,240 points
1,416 views

1 answer to this question.

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,980 points

Related Questions In Git & GitHub

0 votes
1 answer

How to add an empty directory to a Git repository?

Hi@akhtar, A popular solution is to simply add ...READ MORE

answered Oct 5, 2020 in Git & GitHub by MD
• 95,460 points
1,111 views
0 votes
1 answer

How to stash untracked files of the current working directory in Git?

Hi@akhtar, In order to stash untracked files, add ...READ MORE

answered Nov 20, 2020 in Git & GitHub by MD
• 95,460 points
16,034 views
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,890 points
2,456 views
0 votes
1 answer
0 votes
2 answers

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

The closest way to view branches in ...READ MORE

answered Aug 2, 2019 in Git & GitHub by Sirajul
• 59,230 points
1,602 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,700 points
2,351 views
+15 votes
2 answers

Git management technique when there are multiple customers and need multiple customization?

Consider this - In 'extended' Git-Flow, (Git-Multi-Flow, ...READ MORE

answered Mar 27, 2018 in DevOps & Agile by DragonLord999
• 8,450 points
4,035 views
+2 votes
1 answer
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP