Stop all running containers with Docker

These are some handy snippets I use on a regular basis when managing containers. I have one server in particular that can sometimes end up with 50 to 100 orphaned containers for various reasons. The easiest/quickest way to stop all of them is to do something like this: docker container stop $(docker container ps -q) Let me break this down in case you are not familiar with the syntax. Basically we are passing the output of docker container ps -q into docker container stop. This works because the stop command can take a list of container ids which is what we get when passing the -q flag to docker container ps. ...

April 3, 2024 · 1 min · 111 words · Mike Conrad

Automating CI/CD with TeamCity and Ansible

In part one of this series we are going to explore a CI/CD option you may not be familiar with but should definitely be on your radar. I used Jetbrains TeamCity for several months at my last company and really enjoyed my time with it. A couple of the things I like most about it are: Ability to declare global variables and have them be passed down to all projects ...

March 11, 2024 · 5 min · 944 words · Mike Conrad

Self hosted package registries with Gitea

I am a big proponent of open source technologies. I have been using Gitea for a couple years now in my homelab. A few years ago I moved most of my code off of Github and onto my self hosted instance. I recently came across a really handy feature that I didn’t know Gitea had and was pleasantly surprised by: Package Registry. You are no doubt familiar with what a package registry is in the broad context. Here are some examples of package registries you probably use on a regular basis: ...

March 7, 2024 · 2 min · 314 words · Mike Conrad

Traefik with Let’s Encrypt and Cloudflare (pt 2)

In this article we are gonna get into setting up Traefik to request dynamic certs from Lets Encrypt. I had a few issues getting this up and running and the documentation is a little fuzzy. In my case I decided to go with the DNS challenge route. Really the only reason I went with this option is because I was having issues with the TLS and HTTP challenges. Well as it turns out my issues didn’t have as much to do with my configuration as they did with my router. ...

February 15, 2024 · 3 min · 512 words · Mike Conrad

Traefik with Let's Encrypt and Cloudflare (pt 1)

Recently I decided to rebuild one of my homelab servers. Previously I was using Nginx as my reverse proxy but I decided to switch to Traefik since I have been using it professionally for some time now. One of the reasons I like Traefik is that it is stupid simple to set up certificates and when I am using it with Docker I don’t have to worry about a bunch of configuration files. If you aren’t familiar with how Traefik works with Docker, here is a brief example of a docker-compose.yaml ...

February 1, 2024 · 4 min · 738 words · Mike Conrad

Roll your own authenticator app with KeystoneJS and React - pt 3

In our previous post we got to the point of displaying an OTP in our card component. Now it is time to refactor a bit and implement a countdown functionality to see when this token will expire. For now we will go ahead and add this logic into our Card component. In order to figure out how to build this countdown timer we first need to understand how the TOTP counter is calculated. ...

January 17, 2024 · 5 min · 868 words · Mike Conrad

Roll your own authenticator app with KeystoneJS and React - pt 2

In part 1 of this series we built out a basic backend using KeystoneJS. In this part we will go ahead and start a new React frontend that will interact with our backend. We will be using Vite. Let’s get started. Make sure you are in the authenticator folder and run the following: $ yarn create vite@latest yarn create v1.22.21 [1/4] Resolving packages... [2/4] Fetching packages... [3/4] Linking dependencies... [4/4] Building fresh packages... success Installed "[email protected]" with binaries: - create-vite - cva ✔ Project name: … frontend ✔ Select a framework: › React ✔ Select a variant: › TypeScript Scaffolding project in /home/Mike Conrad/projects/authenticator/frontend... Done. Now run: cd frontend yarn yarn dev Done in 10.20s. Let’s go ahead and go into our frontend directory and get started: ...

January 10, 2024 · 4 min · 749 words · Mike Conrad

Roll your own authenticator app with KeystoneJS and React

In this series of articles we are going to be building an authenticator app using KeystoneJS for the backend and React for the frontend. The concept is pretty simple and yes there are a bunch out there already but I recently had a need to learn some of the ins and outs of TOTP tokens and thought this project would be a fun idea. Let’s get started. Step 1: Init keystone app Open up a terminal and create a blank keystone project. We are going to call our app authenticator to keep things simple. ...

January 3, 2024 · 4 min · 794 words · Mike Conrad

Hoots Wings

While working for Morrison I had the pleasure of building a website for Hoots Wings. The CMS was Perch and it was mostly HTML, CSS, PHP and JavaScript on the frontend, however I built out a customer store locator using NodeJS and VueJS. I was the sole frontend developer responsible for taking the designs from SketchUp and translating them to the site you see now. Most of the blocks and templates are built using a mix of PHP and HTML/SCSS. There was also some JavaScript for things like getting the users location and rendering popups/modals. ...

July 12, 2023 · 2 min · 268 words · Mike Conrad

Hilger Grading Portal

Back around 2014 I took on my first freelance development project for a Homeschool Co-op here in Chattanooga called Hilger Higher Learning. The problem that they were trying to solve involved managing grades and report cards for their students. In the past, they had a developer build a rudimentary web application that would allow them to enter grades for students, however it lacked any sort of concurrency meaning that if two teachers were making changes to the same student at the same time, teacher b’s changes would overwrite teacher a’s changes. This was obviously a huge headache. ...

May 21, 2023 · 3 min · 473 words · Mike Conrad