Public P2000 messages website hosted via a free-tier Azure App Service plan
I’m collecting Dutch P2000 messages sent out by Dutch emergency services to “page” them. These public FLEX-protocol based messages are broadcasted all over the Netherlands and you can receive them via a cheap DVB-T-receiver. Sometimes, when I hear a siren in my neighbourhood (or wherever in the Netherlands I am), I’m curious as to what is happening. Accessing my smartphone, connecting via VPN en accessing my Elasticsearch cluster via Kibana does mostly satisfy my curiosity, but it’s not a convenient and fast process. Then why not use one of the many P2000 websites that are out there already? I simply don’t like them enough. Also, I love to play around with frontend-stacks (so many choices!), being mostly a backend/infrastructure kind of guy. So, that got me on the look for a cheap (or preferably free-tier) container-based hosting solution that can serve P2000 messages to other curious people like me.
So, the main purpose is a simple, mobile friendly publicly accessible website that shows the most recently broadcasted P2000 messages. It features a simple search and auto refreshes the datatable thanks to a Server Sent Event (SSE)-connection from each capable client to the webserver. The web server runs on NodeJS express and uses Bootstrap, datatables.net and pugJS as a templating-engine for writing HTML. It could have been hosted via a free tier for the web part via Azure App Service plan, but I’ve decided to pick the 11 €/month ‘B1’ because the free ‘F1’ plan lacks ‘Custom domains / SSL’ which I personally prefer:
Then there is the need for some kind of database, because though it would be possible to serve the website without, I’d like it to be stateless and be able to refresh the latest state from the database at startup. MongoDB Atlas offers a “M0 Sandbox” free tier which (they claim) is free forever. And though limited (to 512MB database size), it is very useful for this scenario, serving the latest messages to a NodeJS powered web application.
There is a lot more involved in the backend part that runs “on-premise” at my home (and maybe I will write about this in the future), but its the public “free hosting challenge” I wanted to write about. So, if you have a non-static website but otherwise lightweight you want to host from a container and you need some kind of database as well, Azure App Service Plan and Atlas MongoDB are interesting choices. Thank you Microsoft and MongoDB!