or how I run automatic database backups with Gitlab CI/CD

Photo by Franck V. on Unsplash

Gitlab, as I’ve already mentioned in my other articles, is really powerful tool. It is not only a Git repository manager anymore, you can do much more with it. And by much more I mean really much more. One of its feature I want talk about today is scheduled jobs.

Of course, it is not unique feature of Gitlab, but it really nicely contributes to the whole DevOps ecosystem and you don’t need to use different services or setting up your server.

I’ve been testing it for a while and I’ve decided to move all my backup cron jobs from…

Photo by Annie Spratt on Unsplash

I’ve been working with the Wordpress for about 10 years. I’ve started by tweaking the CSS, HTML and JS in default or downloaded themes, then I started to created my own themes and getting deeper and deeper. As I came from the OOP background, I started to dislike some practice within this CMS.

Don’t get me wrong, it is still the preferred choice for most of my projects — small business websites, because it is easy to get the project up and running and it has some advantages (for example quite good UI) over other choices. …

Recently I wrote an article about using Google Cloud run a hosting option for a (small) Wordpress website. You can read it here:

And in this article I show you how to set up CI/CD to deploy this website.

1. Service account

First we need to create a service account with permissions to be able to build and deploy. Roles we need to assign to the service account are:

  • Cloud Build Editor — to be able to build the image
  • Storage admin — Container registry uses Cloud Storage to store images, our service account needs to create a bucket and also read and…

There are multiple ways to use images or other files in Google Cloud Storage or Firebase Storage* in your Firebase web application, and each of them has its use and of course pros and cons.

* Firebase Storage is a product derived from Google Cloud Storage. In most cases you can work with it as if it was native Google Cloud Storage. You can for example access your buckets directly via Google Cloud console, where you have also much more possibilities, but it comes also with its Firebase perks focused for mobile/web apps development. …

I have often a feeling, that we try to follow best practice in all programming languages and framework, but our coding of HTML and CSS hasn’t change much. We just include new tools (adding includes, mixins, loops) but without really carrying if it is a code we can easily maintain, modify, if the next developer who opens the file will understand what we did.

I realised that my code doesn’t feel right. I had to search multiple files and in infinite indentation to find a selector and add !important because 15th selector for one element would be too much.


Firebase is a really amazing tool, easy to implement in the code, easy to use, no back-end required. However if you came from the SQL world, it requires changes in the way you think and most-important in the way you construct your data store. And obviously I struggled with that and still do.

You don’t want to store your data to optimize them for the storage, you want them optimised for your request. In other words — when you send a request, the response should be already “pre-prepared” in the structure of your collections. You want to avoid any kind…

If you’ve used Firebase and especially Firestore in your javascript (Angular in my case) project, you might have had the same problem as I have. Date and time in the Firestore are saved in their proprietary date format — called Timestamp.

Firestore timestamp is just a simple object with two properties — seconds and nanoseconds, which apparently has some advantages over “classic” date format.

A Timestamp represents a point in time independent of any time zone or calendar, represented as seconds and fractions of seconds at nanosecond resolution in UTC Epoch time.

It is encoded using the Proleptic Gregorian Calendar…

When I started to play around with Kubernetes, my goal was to move my websites hosted on my server on the Hetzner. The problem was the cost. It would cost me at least same amount for each website as I pay for the whole server. And if you have a website with very few visits and not aimed to produce income, it wouldn’t really make sense. So this wasn’t the way.

But I discovered Google Cloud Run and I decided to give it a try and move my websites there. So what it is?

It’s a fully managed compute platform…

Recently I needed to implement a contact form to a single page static website. As there is no backend, I had to find a solution how to send emails from the browser.

As email service I decided to use Mailgun as I had found good reviews and for the use I need it — not even 1 mail per day, it should be free. Let’s see that in few months :)

The question was how to invoke their api from client-side javascript. I haven’t found any solution, only some stackoverflow comments, that it is not possible from browser.

So I…

Peter Kracik

senior front-end & back-end developer, with experience in graphic design & devOps #angular #symfony #nodejs #docker #twig #wordpress #firebase -> kracik.sk

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store