I know I’ve mentioned this before, but I’ve recently started to get serious about my content production and deployment approach on The Polyglot Developer. My goal is to be able to write my tutorials in Markdown, push to GitLab, and have it automatically deployed as a Docker container on my production server. Being able to automate things and take advantage of Docker will definitely improve my productivity in the long term.
So I’ve been playing around with tools on the subject, more specifically GitLab, because that is what I’m using to save a history of the blog. GitLab is a source code repository, but also a whole lot more given its ability to do continuous integration, continuous deployment, and work with Docker directly.
We’re going to take a look at installing GitLab and Docker on a Raspberry Pi, then configuring a GitLab CI Runner to take control of our continuous integration process every time we push some code. While it might sound easy, there are some certain things that aren’t so obvious in the setup and configuration.
Read MoreI recently picked up a Yubico U2F hardware key and thought I’d try to create a web application that was protected with two-factor hardware-based authentication. Things were going smooth until I realized that it is mandatory to be using HTTPS within your application, even when testing locally. HTTPS is common, but I’d never actually set it up with Node.js because I had always been using services like Cloudflare that configure it for you. The problem is that these services are for live domain names, not necessarily localhost.
While we’re not going to explore U2F hardware keys in this tutorial, we’re going to take a look at creating and installing a self-signed certificate for use in Node.js within macOS.
Read MoreIf you’re using Amazon S3 for a CDN, it’s possible to serve compressed, gzipped files from an Amazon S3 bucket, though there are a few extra steps beyond the standard process of serving compressed files from your own web server.
Read MoreI’ve been slowly trying to cut down on my online file storage footprint by switching to software and tools that I’m in full control over. For example, I was once a very heavy user of Dropbox and similar tools when it came to transferring files around between my computers, but that could leave my files exposed in the cloud, not to mention it was slow due to the time it took to communicate with the remote server.
This is where Resilio Sync comes into play. Once called, BitTorrent Sync, this software allows you to transfer files between devices on your network, without a middleman, in a peer-to-peer (P2P) fashion, like you would find with the popular BitTorrent protocol. The more devices, the faster the synchronization.
We’re going to see how to install and configure Resilio Sync on a Raspberry Pi to act as a synchronization node on your network for file storage and fast transfers.
Read MoreAs you probably know, I’ve been doing a lot with GraphQL recently. I’ve released tutorials that include Java with GraphQL, Node.js with GraphQL, as well as Golang with GraphQL, but I’ve only ever demonstrated testing those GraphQL APIs with cURL. If you’ve ever used cURL for anything, not specific to GraphQL, you’ll know it works well, but it isn’t the most friendly tool available.
We’re going to look at an alternative method to testing GraphQL queries using a convenient Google Chrome extension called ChromeiQL.
Read MoreI’ve been in the web game for quite some time and have my fair share of web server software. I’ve used Microsoft’s Internet Information Services (IIS), Apache httpd, as well as NGINX, and while they all thrive in their own ways, they’ve been overkill for most of my use cases. This is where Caddy comes in, a lightweight alternative to these seasoned, but often heavy web servers.
We’re going to see how to use Caddy and learn why it is so powerful while using minimal effort on a developer operations side.
Read MoreIf you’ve ever worked with Docker containers you’ve probably been exposed to them being stateless, meaning when a container is destroyed, all record of it is lost including any files it might have created. Not great if you’re working with say a database, correct? However, let’s look at this from a different angle. Let’s say you are deploying a web application that requires some configuration. Depending on how you’ve developed it, the configuration could be controlled via a file or via environment variables. How do you accommodate this with Docker container deployments when you don’t want these configurations baked into the image?
We’re going to see how to work with volume mapping between container and host machines as well as passing environment variables at container deployment with Docker.
Read More