Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to deploy my bitbucket code easily to my production server

Tags:

git

bitbucket

I got a private git repo on Bitbucket, i update it from my local repo. It works just fine. But now my project is about to be done and i need to find a solution to deploy my code to the production server.

I look for a easy and fast solution but i did not find anything for bitbucket, all solution seems to be designed for github...

Of course i can connect to the serv and make a git pull but i really want to find something to automate this.

Do you know a service, a tool for that ?

like image 751
Xavier Avatar asked May 13 '13 08:05

Xavier


People also ask

Where can I deploy my Bitbucket repository?

DeployHQ can deploy your Bitbucket repositories to almost any type of server. Whether that be shared hosting via FTP or a DigitalOcean droplet. Sometimes you don’t have any control over the environment your website will be deployed to. Don’t let the limitations of your server protocol or hosting platform ruin your development experience.

What is the best way to integrate Bitbucket with production servers?

Develop locally and 1.) commit to your local repsoitory - 2.) push your local repository to your Bitbucket server - and 3.) have those pushes available on your production server In this case Bitbucket Server holds your CENTRAL repository - every developer should push his changes to this server.

How does Bitbucket work?

Bitbucket is the central point here, that's where your code lives. You clone your repo from Bitbucket to your workstation, make the changes and push the changes back to Bitbucket. Once you have code that you think is ready for primetime you'd clone the repo onto your production server (or pull changes if you've cloned the repository already).

Do Your developers develop locally or push to Bitbucket?

Our developers develop locally, and push to Bitbucket Server. Our next hop is to internal development "test" servers. I have project-specific repositories on those servers, "pull" scripts for each project, and project-specific scheduled tasks in Windows Task Scheduler.


2 Answers

I finally use choose Dandelion.

It's really easy to install : gem install dandelion and easy to use, you just have to edit dandelion.yml put your connection info there and then dandelion deploy!

Works fine, fully integrated with git and service agnostic :)

like image 152
Xavier Avatar answered Oct 26 '22 00:10

Xavier


The idea that there is a easy and fast solution to deploy your code is a lie - don't believe it. There are always things that you've missed, and there are always things that go wrong. So don't underestimate it or leave it as an afterthought.

You haven't given away anything about your application, so I can't give you specific details, but if you own your own server and are looking for a way of simplifying the deployment step, take a look at capistrano. It's not only for rails apps, despite the fact that it works for these out of the box. I've used it on PHP projects with great success - it just takes a bit more setup.

If you're looking for a fully automated solution including hosting, you might like something like heroku. However, this is dependent on your application, and what technology you've used.

like image 31
Jon Cairns Avatar answered Oct 25 '22 23:10

Jon Cairns