One click/push deployment

Feb 10, 2024 - by Nish

As we have many product specific websites, managing them all manually tedious task in terms of time and effort. We prefer static websites to be static but at the same time wanted to have the flexibility of making changes faster. We were analyzing many solutions to achieve the desired result.

At the end we have settled on improving our deployment pipeline and making the entire deployment automated. So as soon as we have pushed a committed change it should reflect in our live website. This is more like having a dynamic website. You edit the website using a nice desktop based editor instead of web based edited then commit and push the change and see it is getting reflected in realtime.

Here we will see how we have achieved our automation. In summary we have followed below steps.

  • Communicate effectively with our customers
  • Keep the website minimal and load faster
  • Allow customers to contact us easily
  • Set the correct expectation on our pricing

As we were long term users of Wordpress for many other blogs first thought of using it with appropriate custom theme. Then we thought to do right thing, remember the mantra of "Don't cut vegetables by axe!" Powerful tools are not handy for all jobs, choosing appropriate tools make the job easier and cost effective. Wordpress was invented for blogging and was very successful and people started using it for everything from eCommerce, Coorporate websites etc. Then they thought of slowness caused by the overkill and invented many caching plugins to generate static pages temporarily. So we decided to use static page builder when as we needed static website with some dynamic ability in contact us page.

As the long story short here we are with our company page build using static site builder and served you in second. Our long term plan is to use Jekyll static site builder but in the mean time we have used Bootstrap studio to generate the site look and feel we wanted. We will convert this in to a Jekyll theme and will generate future content using it.

Hosting the site

It is nice memory since we started hosting free websites in Yahoo Geocities with advertisement banner on the top. We have come long way from there. We have also used GoDaddy and many other hosting providers along the way. When the cloud has come with the freedom of choosing our own technologies and once we have tasted it there was no going back of it. We have used Amazon, Google, and Microsoft cloud for various solutions but personally we had settled with Digital Ocean droplets as cost effective solutions for running smaller services.

But this time we wanted to host it completely from our own servers with muti-node docker swarm network. We have even hosted website with decent traffic in Raspberry Pi successfully, so this time with a decent server there was no worry on performance. As we had plentily of resource at disposal compare to Raspberry Pi or Digital Ocean droplets, we have ourselves opted for more sophisticated services.

We have gone to use Traefik compare to Nginx. There is no denial on Nginx, we actually use it very much even in current setup but only the load balancer has been replaced by Traefik in our current setup. Nginx is good solution and perform better than Traefik, but Traefik comes in handy as cloud native solutions with auto discovery of services, a dashboard for monitoring things at one place and automatic Letsencrypt's SSL certificate management features are hard to reject.

We have also setup Portainer for managing the cluster which we usually do through CLI commands over SSH connections. Portainer allows managing the docker stack from web interface and also allows connecting to our private docker registry and browsing our custom built docker images. So this is a nice to have one when you have a good server to manage your own stack.

So now our static websites are served from our own servers, managed by Portainer, load balanced through Traefik proxy. More things happening at our end now and we will come with further updates soon.