Building a MongoDB-style Query API for Postgres with Ecto

There are challenges that come up in almost every web application project. One of those challenges is finding a way to let users query your database or filter a given dataset.

Again and again you’ll have to build a UI or an API in which users can compose queries and specify sorting options.

Depending on your use-case, this can quickly become a complex endeavour. How do you even design such a querying API? And more importantly: How do compose those queries in a secure fashion?

This article will introduce you to a little-known feature of Ecto and show you how…

Secure any app with free HTTPS certificates in absolutely no time with Traefik.

A while ago, I wrote an article titled “Nginx and Let’s Encrypt in Less Than 5 Minutes”. It quickly became my most popular post ever, with thousands of claps and hundreds of forks and stars on GitHub.

My original approach included a script that needed to be run once for each deployment. It’s effective, simple — but a little clumsy. So I kept wondering: What if there is an even easier way to set up Let’s Encrypt with docker-compose?

I like keeping things simple. This is why I tend to avoid unnecessary dependencies in my projects. You certainly won’t find…

Getting Nginx to run with Let’s Encrypt in a docker-compose environment is trickier than you’d think …

The other day, I wanted to quickly launch an nginx server with Let’s Encrypt certificates. I expected the task to be easy and straightforward. Turns out: I was wrong, it took a significant amount of time and it’s quite a bit more complicated.

Of course, in the grand scheme of things, it is pretty straightforward. But there are a couple of details you need to be aware of. The goal of this guide is to help you build a docker-compose setup that runs nginx in one container and a service for obtaining and renewing HTTPS certificates in another.

Here is one lesson I had to learn the hard way: Everyone needs a status page.

Senior Lamb Data Analyst. (Original photo by Robin Vet on Stocksnap)

Yesterday my app went down. My PaaS provider had decided to update their platform late that evening. This caused an obscure bug which kept my Docker containers from spinning up again. The consequence was devastating: My app was offline for hours. I had no way of fixing a bug over which I had no control.

Worse yet: I had no good way of letting my users know what was going on. I could only email everyone and apologize in person.

Why Monitoring Is Not Enough

Could this be the easiest, cheapest, most reliable way to monitor websites and API endpoints?

A traveler watching monitoring stats on AWS CloudWatch. (Original photo by David Marcu on Unsplash)

When you run a website, a web app or some other kind of service on the Internet, it is always a good idea to keep an eye on its availability and performance. Obviously, you don’t want to manually check in every hour to see if everything is still up and running. Let’s automate this!

This guide is going to walk you through setting up monitoring for one or several HTTP(S) endpoints. We are going to do this using two AWS services: AWS Lambda and AWS CloudWatch. Lambda is Amazon’s serverless computing offer which allows you to perform one-off executions of…

Here is what Developers and Users need to know about Electron’s latest security issue.

A glowing electron in front of a gloomy sky with random binary numbers is never a good sign … Original photograph by code404 (CC0)

On Monday, the Electron team published security advisory CVE-2018–1000006 describing an arbitrary code execution vulnerability in Electron. Arbitary code executions — or remote code executions (RCE) when performed through a network — are the most severe class of software vulnerabilities. They allow an attacker to run any code on the victim’s machine.

Am I affected as a User?

The current report affects Electron applications on Windows that use custom protocols. Custom protocols allow applications to handle links from web pages or other applications. Links on Apple’s App Store web page, for example, use URLs beginning with itmss:// so that they can be opened directly by iTunes.

Learn how to build Docker containers for Elixir apps with this guide.

Lots of containers. (Original photograph by Chuttersnap/StockSnap. License: CC0)

A Quick Recap on Docker & Elixir Releases

This article is best read when you already know what Docker and Elixir Releases are. If you need to refresh your memory, check out this little introduction that (curiously) explains both concepts at the same time:

Why use Docker with Elixir?

I’ve previously written about how to create Elixir Releases with Distillery. Releases are great and one of the many features to love about the Elixir/Erlang ecosystem. But the extent to which they are truly self-contained is limited.

A Release can only run on systems sufficiently similar to the build system. What does that mean? Unfortunately, that question doesn’t have a trivial answer. Most importantly…

From Beginner to Expert: Improve Your Elixir Skills With These Five Videos.

Colorful Elixirs. (original photo CC0 by JohnBello2015/Pixabay)

The number of Elixir developers keeps growing steadily. And while Elixir hasn’t become the world’s number one programming language just yet, there is a constant stream of new developers who join the community. Naturally, this also means an ever-increasing number of participants for the two biggest annual Elixir conferences: ElixirConf EU in spring and ElixirConf US in fall.

Developer conferences don’t always manage to keep their quality up to par with growing audiences. The ElixirConfs have been a brilliant exception so far, offering both approachable talks for newcomers and interesting presentations for veterans.

In this post I have picked five…

How to create Elixir Releases. And some tips for Phoenix, Ecto, and umbrella applications.

A Quick Refresher and a Bit of History

Releases have long been around in the Erlang/OTP world.

I have previously written about what Releases are and why they’re great in more detail. Here is a little refresher: Releases are self-contained bundles of compiled Elixir/Erlang code that can easily be deployed on remote machines.

Naturally, most tools for creating Releases have so far come from the Erlang world. Erlang ships with systools and reltool, but their usage is rather complicated. So the community built relx as an easier-to-use alternative that has now become the de-facto standard for creating Releases from Erlang projects. …

You’ve heard about Docker, you’ve heard about Releases — but what exactly are they? Should you use them? Can they work together?

Deploying an application to a production server can be a tedious task. You always have to prepare and package your code for execution on the remote system first. This is, of course, no different for Elixir and Erlang applications. In this article, I want to explore two ways of packaging an application for deployment and explore the potential benefits of combining both approaches.

Packaging an Application with Erlang’s Releases

Like so many things we enjoy about Elixir today, Releases have already existed in the…


I make software. Passionate about Elixir. User of C++, Ruby & JavaScript. Current project:

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