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

July 12, 2017 3.4k views
Nginx Deployment DigitalOcean Django Git Ubuntu 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.

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 https://github.com/adnanh/webhook and the bitbucket hook example at https://github.com/adnanh/webhook/wiki/Hook-Examples

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 https://www.hookdoo.com/

All the best,
Adnan

Have another answer? Share your knowledge.