Dear Docker,

We've had our struggles, we've had our differences, but we've had a lot of good times. I like the simplicity, I love the portability, and I enjoy the ecosystem.


I've been using Docker for a while now, running almost everything reasonably I can with it. It's made my life a lot easier, and I'm immensely thankful for it. I love when I need to rapidly scale it's trivial. No more taking entire VM images, just simple docker files, one command, and we've off to the races.

I've been asked some questions here, such as, "how do you properly maintain storage in both database and file-wise" - to which my answer is:

  1. Use a managed database service, it costs a bit more (AWS, DigitalOcean, etc all have some) – but it's worth it. Less headache, you know exactly where your data is, and it's usually quite fast.
  2. Use a content delivery network – services like CloudFront (AWS), DigitalOcean Spaces (which I use), and BunnyCDN are all affordable options. For my wife and I's blog, I pay $5/month to DigitalOcean Spaces and get a reasonably fast CDN out of it - Ghost hooks right into the S3-style interface, and uploads content appropriately

You also need to ask yourself - what do you reasonably need? Do you need hundreds on infrastructure to support a few thousand visitors? No, absolutely not! A standard DO droplet could, for example, sustain 100,000 page views in a month. No biggie.

For all of my personal infrastructure on DigitalOcean (~5 droplets in production, 2 spaces), it all runs Docker on the lowest ($5) droplets. I use Cloudflare in front for caching, and it helps me save a ton of bandwidth. This month alone (Apr 1-27th), I've used 1.25TB of bandwidth, out of which I was only logged on DigitalOcean as using 124GB/1TB limit (656GB of free droplet-droplet transfer was used). It's hard to beat this with most providers. Sure, a provider could offer unmetered 1Gbit line, but if the quality of host node and bandwidth is not good - then you're just wasting money. I personally would rather pay premiums of good, stable hosts / bandwidth, that I could burst if necessary, then paying for slow/oversold networks.

As I am in the process of redesigning my personal infrastructure, I thought it would be a great time to lay it out here.

First, I'll need four new hosts. All will be on DigitalOcean Droplets. They will each be in the same region, and one will run Portainer.

Applications that they will run:

  1. Portainer (Master Only)
  2. Nextcloud (Master Only) with DO Spaces
  3. Grafana (Master Only)
  4. Prometheus (Master Only)
  5. Speedtest (All) - test speeds between containers and from home -> DO
  6. Ghost (Mojito, Yappie) - wife & I's blog
  7. Redmine (Master Only) - tracking bugs, and future expansion, etc...
  8. Discord & Slack Bots (Percella) - runs a few bridges between irc & discord & slack
  9. Twilio Responder Server (Percella) - I run gateways for pushing to/from Twilio for SMS, Voice, and Fax - this will push messages to/from Twilio to my Discord/Slack/IRC channels where appropriate. It allows me to cheaply "text" anyone from anywhere
  10. Staging Environment (Mojito, Yappie) - will be used as staging for our blogs, as well as any customer work, etc.

As you may be able to tell, the Master will mainly be for monitoring, some light interface for pushing files to DO Spaces/S3 when applicable, and all will run a speedtest server. Then we have two hosts running our blogs, these will pump out logs to Logstash (Master). I can then review and tweak changes as necessary.

Lastly, I'll be running traefik on every host, with Lets Encrypt for the SSL certificates. Despite being behind Cloudflare, I still generate certificates for all my domains, and only let HTTPS traffic in/out, and enforce Cloudflare to validate my certificate when it pulls data to serve. It doesn't take long to setup, but is definitely worth it in the long run. As I get things setup, I'll blog on here about them.

What I'd like to setup after all of this, is a new music streaming server. My current one is in Quebec (OVH), but is limited to 100Mbit port, while it's good, I share music with over 25 people, and we can cap out that port very quickly. A bigger port speed is required, I'm thinking 1Gbit should suffice, so I'll be upgrading that shortly.

Down to dollars and cents, at the end of the month on DigitalOcean, I'm paying:

4x$5 ($20) plus 2 DO Spaces (2x$5) = US$30 per month. If you add in my jump server (OVH), which I pay for in 3 month increments, it's about $60 after-tax every 3 months.

Lesson learned the hard way: Always lock your stuff down, and always, always have a jump server. Especially when travelling aborad, having one server with keys to everything is useful, now I can connect on my iPad or my phone, or even on my work computer and fully manage all my infrastructure.

engineering cloud docker cdn containers


Senior Software Engineer, Labber, Sysadmin. I make things scale rapidly. Optimize everything.

Read More