HAProxy and Certbot on Docker

HAProxy and Certbot running in Docker containers to provide TLS secured frontends for your web applications.

A while ago I wrote a post about running HAProxy on Docker, where the goal was to set up HAProxy in a Docker container so that it could provide frontends for requests and use Docker containers as backends.

The goal this time is to involve Let’s Encrypt/Certbot to generate and provide TLS certificates on the fly, so that HAProxy frontends are automatically equipped with corresponding certificates, avoiding separate server configurations for each interested container. The containers themself shall be in a Docker-internal network that is solely accessible through the HAProxy container.

Continue reading “HAProxy and Certbot on Docker”

DIY HiFi Audio Streamer

Raspberry Pi 2 with HiFiBerry DAC in 3D printed case

I wouldn’t call myself an audiophile but I do appreciate when great music comes in great quality. And there’s something that’s been bugging me for a while: finding the right steaming client for high fidelity audio can be quite challenge – at least it was to me. But being a fan of DIY solutions led me to a different approach. I mean, why would I spend a ton of money on some product if I can spend a ton of money on parts & tools and fail try building one myself?

Continue reading “DIY HiFi Audio Streamer”

Node-RED authentication with JWT

Node-RED is a great open source tool to create flows for automatization purposes. I run it in a Docker container (Node-RED Docker image) to fetch and elaborate information and send me an alert if something’s out of the ordinary.

Out of the box, Node-RED is not secured, and anybody who can access its IP can see and change flows, and access its API. But there’s the possibility to configure the application so that it is accessible only after authentication.

Continue reading “Node-RED authentication with JWT”

Website to PDF

Long gone are the days when you’d print the contents of digital documents onto dead trees in order to archive them or mail them by letter. Luckily there’s a portable document format (PDF) and documents in this format are widely accepted. While it shouldn’t be a problem to get a PDF document from an office application such as Microsoft Word, getting one from the contents of a website is not always straight forward.

Continue reading “Website to PDF”

HAProxy for Docker containers

At work I am currently developing an application that provides some tools and represents aggregated data from different sources to facilitate the workflow in different departments. It basically consists of two applications, a single page application being the front-end, and a RESTful API as back-end.

The applications run in separate Docker containers on a virtual machine in the firm’s intranet, as well as a couple of other dockerized applications. In the beginning that ensemble worked quite well, because those applications were only used by specific persons or systems. So exposing different ports for different applications under the same domain was not that much of a problem. But that changed when the aforementioned SPA & API became more widely used. On one hand it isn’t that great to explain to (technically challenged) users – to use one and the same domain but different ports for their apps -, on the other hand it just ain’t pretty. And since change needed to happen I also wanted to route HTTP traffic over TLS. Because… why not?

Continue reading “HAProxy for Docker containers”

Quiz Nautico Base

In barca a vela da Riva del Garda verso Torbole

È dal duemiladieci che avevo un sogno, quello di andare in barca a vela. Non solo come passeggero ma come comandante. Quest’anno, ovvero l’anno scorso, l’ho incominciato a realizzare e mi sono iscritto a un corso presso una scuola nautica che finisce col esame per “la patente di abilitazione al commando di unità da diporto“.

Il modo migliore per prepararsi all’esame teorico è – come per la patente moto/macchina – quello di fare, e rifare, e rifa.. i quiz. Ma dato il fatto che non solo si tratta di 1.152 domande ma anche che sono una persona un po comoda, non volevo stamparli su carta. Perché da un lato non avrei avuto la voglia di portarmeli dietro ovunque e dal altro perché sarebbe uno spreco di carta (vedi punto uno).

Quindi ho preso il documento PDF con le domande, pubblicato dalla guardia costiera di Genova, e ho estratto tutte le informazioni che mi sono serviti per creare un’applicazione web che mi consentiva di usare qualsiasi browser per fare i quiz.

Alla fine la ho caricata su qnb.davole.com in modo tale che sia accessibile per chiunque.

Web Intents

About a month ago I held a presentation about Web Intents at work. But what are Web Intents anyway and what are they good for?

  • Web Intents  handle the Intent of an action, for example sharing content after clicking a button
  • Web Intents are not applications. They just tell the client, what they want him to do
  • Web Intents are “blind“, because they don’t know which application will handle the requested action

But who or what does the job then? It’s your browser which knows what to do, because a Web Intent has registered itself, once the web service has been accessed in an earlier moment.

If you’d like to know more about Web Intents – get a quick overview – feel free to take a look at my roughly translated Google Presentation (en – http://bit.ly/MIH1mb), or the original one (de – http://bit.ly/MIICsi).

In my opinion, Web Intents are awesome. The idea of not messing around with Facebook and Google and Twitter and Pinterest (amongst many, many others) no more is wonderful. And users wont have to search their favorite web service for a certain activity anymore.

Useful links:

Chrome 17.0.963.46 – border bug

The newest version of Chrome (17.0.963.46) is a bit of a trouble maker – at least on Windows 7 x64. Seems like the border-radius property causes a bug, which fills the background of the element with its borders color – not entirely, but partly at a height of height x ~0,50-0,52.

Deactivating the border-radius seems to “fix” it, and scrolling has also some effects on it.

Continue reading “Chrome 17.0.963.46 – border bug”