Containers

I've had many strategies over the years how to most easily administrate my website and additional services. My current strategy is to containerize services as much as possible.

Strategy Overview

Some major goals with adopting this strategy:

  • Portablity. Relevant files for a container are centrally located and easily backed up. If I want to switch hardware or reimage the server I should be operational again about as quickly as I can copy the files
  • Ease of implementation. Docker Hub is a large repository of dockerfiles that can be easily pulled to get running quickly
  • Separation of services. By keeping services containerized I am much less nervious of losing unrelated services when working on my server

I have learned that Docker Containers are not a cure-all solution as a system admin. A lot of software exists for managing containers and alternative container platforms exist. However I remain with Docker as it is the most popular platform with lots of documentation and popular Docker Hub. I also do not use any docker management software; this may be costing me man-hours but for my limited use case I do not want to learn something new.

Getting Organized

I contain everything in one directory for simplicity. This is not the Docker-BKM proceedure, but for the simple set of services I host it works well. Within my docker folder, each service will have a folder for containing data, and a single docker compose file.

Fun Fact:

I created the following "screenshot" with the following (in Windows): tree c:\temp > c:\temp\treeout.txt /A /F

docker
|   dc_grav.yml
|   dc_reverse-proxy.yml
|   
+---build_grav
|       Dockerfile
|       
+---grav
|       Placeholder for Grav data.txt
|       
\---reverse-proxy
        Placeholder for reverse proxy data.txt

Docker-Compose

This is where I need to provide an example Docker-Compose file (probably both grav and reverse proxy).

Starting a Container

I do not use any container orchistrators for managing my containers.

Previous Post Next Post