How to automatically deploy code from bitbucket on ubuntu server with nginx, gunicorn/Django already working on it?

Posted July 12, 2017 9k views
NginxGitDigitalOceanDjangoDeploymentUbuntu 16.04

I am having a ubuntu server droplet that uses nginx for routing and gunicorn for django app. We have hosted frontend website using nginx and those are having differnet git repositries on bitbucket. So how can I automate the task of deployement of these frontend websites, so that after every push or pr code get automatically deployed on their respective branches.

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
2 answers

Hello there, I am author of two possible solutions to your problem.

First one is the open-source incoming webhook server that can execute commands, you can find it at and the bitbucket hook example at

Second one is Hookdoo and it follows a little bit different approach. However, it is a paid Software-as-a-Service solution, but it requires you to do zero setup on the server. When you register for the first time, you will receive a month of free trial so you can try it out, and we can help you set it up. You can check it out at

All the best,