Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Automating Gratuity Calculation Tool Deployment via Bitbucket Pipelines & Docker

Steven Parker
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
October 9, 2025

Hi everyone,

 

I’ve developed a lightweight web tool that calculates end-of-service / gratuity benefits (for UAE context). Now I want to automate its deployment using Bitbucket Pipelines so every commit triggers a build + deployment to a server or container.

 

Here’s what I have so far:

 

Code in a Bitbucket repository (Node.js + Express backend + simple frontend)

 

A Dockerfile ready to build the container

 

A target server (DigitalOcean droplet or similar) where I can pull and run containers

 

 

My questions:

 

1. How do I configure bitbucket-pipelines.yml to build, push the Docker image, and SSH deploy (or deploy via Docker registry)?

 

 

2. Any secure practices / environment variables handling (API keys, secrets) I should follow in Pipelines?

 

 

3. How to avoid downtime during deployment — is Blue/Green or Canary deployment possible with Pipelines?

 

 

4. What about rollback strategies if the new version fails?

 

 

 

If anyone has done automated deploys of utility tools or small web apps via Bitbucket Pipelines + Docker, I’d greatly appreciate sample configs, pointers, or pitfalls to watch out for.

 

Thanks in advance! 🙏

1 answer

0 votes
Mark
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
October 21, 2025

This is a fantastic project, Steven! Automating deployment for a tool like this is a smart move. I actually run a very similar web tool focused specifically on UAE gratuity calculationshttps://thegratuitycalculatoruae.ae/ – and while our deployment stack is slightly different, we faced the exact same questions early on.

For secrets management (your point #2), we heavily rely on Bitbucket's repository variables, marking sensitive ones as 'Secured'. These are then injected as environment variables during the pipeline run and consumed by the application/Dockerfile. It keeps secrets out of the codebase and secure within Bitbucket's environment. For deployment (#3), we started with a simple SSH script in the pipeline to pull the new image and restart the container, but we're now exploring more robust zero-downtime strategies using Docker Swarm or Kubernetes for rolling updates, which Bitbucket Pipelines can definitely trigger.

It's great to see others building tools to simplify this complex calculation for UAE employees. Best of luck with your pipeline setup! 🙏

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events