Lightweight Docker Management
When starting on a self-hosting journey, most people begin with Docker. It's reasonably simple to install, and your first container can spin up with a simple command. As you add more applications, managing them becomes an issue. Docker Compose is an IaC (Infrastructure as Code) specification that allows you to specify exactly how your containers should be set up. This is invaluable for ensuring consistency in the face of disaster. When it comes to managing applications this way, there are two schools of thought. The first is putting all your applications in a single compose file so that you only need one command to recreate your complete application environment. I started out this way, and it works decently. Unfortunately it doesn't scale very well and becomes annoying to make changes. The second is separating each of the applications into separate, more concise files. In each file, there's only the context for a single application so there's less chance of accidentally affecting other parts of the environment. This raises a new question: How to manage all these files?
The most popular choice has been Portainer. Portainer is a GUI frontend to Docker, and allows you to create "stacks" which represent a set of applications, similar to compose files. However, Portainer stores the compose files inside a volume which could be challenging to get to for newer users. Portainer is free to use in non-commerical settings, but its focus is increasingly on enterprise deployments so it can feel pretty heavy, and there are limitations on what features you can take advantage of.
Enter dockge, by Louis Lam, author of Uptime Kuma. Dockge is an extremely lightweight docker manager that provides the ability to not only create, edit and deploy compose files via GUI elements, but also edit the raw compose file directly for complete control. It allows you to monitor deployments in real-time, and even has support for converting a "docker run" command into a compose file. Recently, Louis has added agent support to allow management of multiple docker servers, which is the next step of self-hosting. I really can't recommend dockge enough, it's fast, simple, and doesn't try to reinvent the wheel. For example, it uses the docker CLI under the hood to access the docker daemon. Installation is simple and easy, just make a couple of directories, download the current compose.yaml file and go!
Before, I was using Portainer to manage a huge monolithic compose file, not really taking advantage of it. With nags to upgrade to the commercial product, dockge is a welcome breath of fresh air. My previous compose file has been split up into multiple, making them easier to manage. I can't recommend it enough! Check it out!