General Service Configuration

General Service Configuration

On my homelab setup there are several different independent services running. The ideal configuration for each of these services divides them into two main sections, the configuration and the data. The configuration section is responsible for saving and using version control on configuration files for each of the programs that make up the service. It also should capture the state of the installed programs, including the version numbers, environment, and dependencies. The data section is responsible for backing up the actual data needed by each of the programs.

For this workflow I chose to use Docker and Docker Compose. The Docker toolkit allows the runtime environment to be explicitly defined through a set of scripts. These scripts create virtual containers to isolate the separate run-time environments. In addition to the security benefits from this setup, the Docker and docker-compose files can be stored and backed-up using git, enabling easy recovery of the individual services. Docker also uses the concept of data volumes to mount a folder of the host’s file system into the virtual containers. The database and application files for the services can be stored in these data volumes. I’m currently working on an automated backup utility for this volumes.

/etc/ configuration data - git