Context When developing Django web applications, one of the most popular ways to debug the performance of database queries, the values of internal variables or other custom metrics is the django-debug-toolbar. To integrate the toolbar into a Django web application, one first needs to configure a list of internal IP addresses. Only if the IP address of the web browser accessing the web application is part of this list, the toolbar will be shown. Otherwise, the toolbar is hidden (even ...

Many applications are automatically tested on each commit inside a GitLab pipeline. If your application relies on a database such as PostgreSQL, it can be tempting to use an in-memory database such as H2 for tests because it is easier to set up and destroy for each execution of your test suite. While this works for simple applications, it is no longer possible once you rely on vendor-specific SQL features (e.g., usage of column types not available in H2). In ...

Learn how to add HTTPS encryption to your Spring Boot application running inside a Docker container. Since the arrival of free Let’s Encrypt certificates, there is really no excuse not to use HTTPS for encrypting your application traffic. Obtaining and integrating a free HTTPS certificate is easy and only requires three simple steps. This article shows the integration for a CentOS 8 web server with a Dockerized Spring Boot application. Registering a Certificate On your web server, obtain certbot, the ...

While there are many great tutorials to integrate Java and Python applications into Kafka, PHP is often left out. However, by offering scalability, high performance and high availability, Kafka is a very promising data infrastructure for combining legacy applications (such as PHP monoliths) with modern microservices. This article shows you how to setup a Kafka-PHP development environment from scratch using Docker and how to send your first message from a PHP application to a Kafka topic. Architecture Overview For this ...

Elasticsearch is a state-of-the-art full-text search engine you might want to use in your next project. It is based on a NoSQL-like document store and optimized for amazingly fast search queries. A powerful API enables features like fuzzy matching (find ‘Toronto’ when searching for ‘Torronto’), stemming (find ‘race’ when searching for ‘racing’) and n-grams (find ‘spaghetti’ with ‘ghett’). In this article, I will show you how to set up an Elasticsearch instance using Docker and PHP and how to easily ...

Bernhard Knasmüller on Software Development