Docker-Compose: How To Rebuild Working Application

While developing application and using docker-compose one question quickly arise: How to properly rebuild application? Once an image is built new one will not be built with the same tag as long it exists in a local cache. The compose builds an image it names it with the pattern <context>_<service_name>:latest. Where: Context is directory name where compose YAML is Service is service name in compose YAML file This means that you can stop or takedown the compose application, next time you run it your images will not be rebuilt if they already exist. Anyway, we aim to rebuild/restart only parts of the system that are changed. Once the compose application is running, we only rebuild the service we are working on. ...

February 2, 2022 · 2 min · Robert Nemet

Docker-Compose: What Every Developer Needs To Know

If you are developing microservices, docker-compose(compose), can be a very powerful tool. Think of a case with an API service and database. Creating and maintaining a database with the use of the Liquibase. Initial plan …would be: start DB run the Liquibase to make changes start an app Adding docker-compose as a driver to utilize this process: sequenceDiagram autonumber Docker -->> PostgresDB: start PostgresDB -->> PostgresDB: wait to finish start PostgresDB -->> Docker: done Docker -->> LiquibasePG: start LiquibasePGDB -->> PostgresDB: execute changeLog LiquibasePGDB -->> Docker: done Docker -->> Echo: start PostgresDB Setup This is the simplest step. According to the docs, this would be enough: ...

January 26, 2022 · 3 min · Robert Nemet

Docker-Compose: Intro

Working with containers is a necessity today for developers. You will likely need to work with some kind of storage or interact with some external service, like Solr or Postgres. You can install the required service on your local machine, which comes with the burden of choosing the correct installation, configuration, etc… Nothing too complicated but takes time. Docker and Containers In short, the container is an isolated process on the host machine. It runs in the isolated file system, a container image. Docker would be a platform, a set of tools, for building, running, sharing applications packed in the container image. ...

January 8, 2022 · 3 min · Robert Nemet

Kubernetes in the bottle: k3d and k3s

Everyone wants to play with the Kubernetes(K8s). There are many options from Google, AWS, Heroku, etc. They offer free tiers that anyone can play with. But what if you want to have your K8s. On your laptop, for fun or to learn something new, without any restrictions. What is k3s The K3s is lightweight k8s by the rancher for Linux. K3s is intended to work with low resources and IoT devices. So, it can easily run on laptops. It is packed as a single binary so it is easy to setup. It requires to have installed docker, as nodes will be run inside containers. ...

March 11, 2021 · 5 min · Robert Nemet

How to schedule task with crontab

I’m keeping notes in simple text files. Imho, this is a straightforward solution that I can control. I need to be able to version my changes and to keep backup as well. For that, I’m using git. But I have to make commits and push changes periodically. I’m delegating this simple, dull, and repetitive toil to the crontab. Crontab ..is a file used by cron. It is a time-based job scheduler available in Unix-like OS. It usually looks like this: ...

February 15, 2021 · 2 min · Robert Nemet