rand(Ø)

> beautiful code & photos

about <

Posts tagged: docker

DigitalOcean to Fly.io

Hello folks,

In the pursuit of saving more and more money to run my websites, I recently switched this blog to Fly.io. A pretty neat developer-oriented hosting solution that has a fabulous free tier and bills extra as you go.

It's been out there since 2017 but only found out recently. Thanks to @Chris from Servers For Hackers!

Last time, I was very happy to announce that my hosting costs were around $5-6 a month, while now it's very close to $0.

The solution I had in mind was to convert my Ghost blogs into static websites, using Hugo

> Continue Reading

MySQL: silent insecure password warning

I won't invent anything new here but I'll share a quick improvement on an answer I've found on Stack Overflow.

If you are doing batch actions and don't want to write in .mylogin.cnf file, there's the trick: use a process substitution!

$ mysqldump --defaults-extra-file=<(printf "[client]\nhost = host.rds.amazonaws.com\nuser = username\npassword = \$PassW0rd\$") \
    database > dump.sql

This also works for any other file input, like Docker env file run param:

> Continue Reading

Upgrading in a few commands

It has been over a year now that I migrated my 2 blogs on full Docker-hosting and I wanted it to be as simple as possible for several reasons:

  • Docker is easy to work with and to maintain
  • Everything is Dockerizable
  • I don't want to spend more than an hour every month or so to upgrade my stacks

At work, we previously used CoreOS to deploy a fleet of Dockerized apps but it was hard to maintain but more specifically, CoreOS is designed for distributed apps, which is not the case of this blog.

So, I searched for a simpler

> Continue Reading

AWS ECS: seamlessly handle app versioning

Our latest project at work involved another Go API and in the effort of easing our debugging and issue tracking I'm used to inject the app version into the logs.
It helps a lot monitoring, especially when rolling out a new version (canary, 50% traffic deployment, etc.).

Preamble

Pre-2018, I hardcoded the version in an app constant which I would increment as part of my release process. It's easy, quick but the only issue is to not forget about it because you may lose versioning syncing over time.

Plus, considering this to be done before each new release, this adds

> Continue Reading

Build a basic Docker stack on Digital Ocean

As I'm getting more and more familiar with NodeJS and Docker, I'd like to Dockerize the few Webapps that run on this server so I can avoid to maintain different stacks.

I use Digital Ocean virtual hosting and I'm pretty happy with it.

Docker is straigtforward enough when it comes to run some containers for testing or development purposes but when you need to deal with High Availability or auto-scaling, it could become a real pain in the ass to configure a CoreOS cluster with all the layers that comes with it.
You'd need to setup fleet, a reverse proxy

> Continue Reading