Deploy from BitBack to Live Server

I recently started using git and have some doubts about the best workflow.

1 - Is it best to use an online repository such as Bitbucket, as an intermediate between local and remote servers? O would be better to deploy directly from local to remote?

I think it will be great to have this medium repository, because it will look like a backup, but it will also complicate my workflow.

2 - If I push my code on Bitbucket, what is the best way to deploy the code to a remote server? I found several different ways:

I want a more effective way in the long term, which does not give me a lot of headaches. I do not mind paying or learning something new (I never use capistrano ..).

If you know any alternative way I'd like to read about!

+8
git bitbucket deployment web-deployment
source share
1 answer

I just went through the same setup with the rails 4 project that I worked on locally, and am now deploying it to a remote server.

You should definitely use some source of version control! I am currently using bitbucket, which was awesome for my setup and workflow, as well as with the added benefit of being free for a private repo.

You're on the right track, my workflow looks like this:

local dev -> commit a bitbucket Then, using capistrano, even though the script runs locally, the actions are still deleted remotely on the server, so it looks like this.

(bitbucket repo) ^ | (local dev) deploy capistrano -> (server) fetches from bitbucket and runs capistrano commands 

The first two resources describe in detail the following process: http://robmclarty.com/blog/how-to-deploy-a-rails-4-app-with-git-and-capistrano

http://matteodepalo.imtqy.com/blog/2013/03/07/how-i-migrated-from-heroku-to-digital-ocean-with-chef-and-capistrano/

When you want to get a little more fantasy and automate, I suggest adding something like a chef, which you can use to configure the server itself (so that you can deploy VM or VPS and run several scripts to configure it in a couple of minutes, and not installing all packages manually)

+2
source share

All Articles