Menu

Docker Compose

While I was working for Trading Technologies, we always planned on using Linux Containers to provide secure hosting of user-written TT SDK algos. Docker was supposed to be the way of ensuring proper isolation, resource management, as well as means of convenient deployment of client strategies. The infrastructure was in place, but I left before we had a chance to materialize our plans.

Recently I decided to give Docker another go, this time as a way of managing my various cloud projects. I was happy with DigitalOcean’s offering, so I began migrating my websites and jobs to their cloud. Everything, of course, is containerized and managed together. I am using Ubuntu 14.04 with Docker Compose.

I must say I am pleased with the results. The migration has been rather painless, and I like how simple the config ended up. I am running a container with a shared MariaDB (MySQL) database, a reverse-proxy Nginx to manage routing, several WordPress blog containers, few C# ASP.NET sites (Mono, not CoreCLR), some Python sites (Flask), and bunch of Python/C++ apps. A sample docker-compose.yml file is shown below.

As you can see, I am using dmp1ce/nginx-proxy-letsencrypt image as a web proxy. Just like with jwilder/nginx-proxy, it’s dead simple to configure routes. All a container needs to do is to specify VIRTUAL_HOST=something.com variable, and the web traffic will be forwarded to its exposed port. Image dmp1ce/nginx-proxy-letsencrypt has LetsEncrypt.org support built right in. Specify LETSENCRYPT_HOST and LETSENCRYPT_EMAIL and voilà- free SSL for your site 🙂