HOMELAB
service book / rev. 06

small systems and repeatable deployments

Infrastructure

One Ubuntu host, containerized applications, a shared private network, reverse proxying at the edge, and enough automation.

Every service gets its own small world. The worlds stay separate until they need to speak to the proxy, storage, or each other.

REFERENCE LAYOUTnot live telemetry
EDGE DNS / HTTPS / reverse proxy
private docker network
APP Acompose project
APP Bcompose project
APP Ccompose project
UBUNTU HOST SSH keys / users / volumes / logs
ubuntu 22.04 lts docker compose ssh key auth reverse proxy let's encrypt github actions where useful
01

operating rules

Five things the setup is allowed.

CONSISTENCY

Docker and Compose make projects behave similarly even when the applications underneath them do not.

INDEPENDENCE

Services keep their own containers, users, configuration, and persistent data instead of sharing one giant pile.

REUSABILITY

A new project should need a small set of known pieces, not a fresh infrastructure religion.

AUTOMATION

Automate recurring work. Leave infrequent work simple enough to do over SSH without building machinery around it.

SIMPLICITY

If Compose is enough, Compose wins.

02

request path

One front door. Several small rooms.

Public traffic arrives at one edge. The proxy decides which internal service receives it.

01INTERNEThttps : 443
02REVERSE PROXYhost routing / TLS
shared private network
AWEBcontainer : 80
BAPPcontainer : 8000
COTHERcontainer : internal
UBUNTU VPS dedicated users · compose projects · persistent volumes
03

deployment path

Push. Connect. Rebuild. Leave it alone.

  1. 01git pushsource changes
  2. 02GitHub Actionsonly on projects that benefit from it
  3. 03SSHkey-backed connection to host
  4. 04git pullrefresh application source
  5. 05docker compose up --build -dreplace what changed
  6. 06application workmigrations / static collection when required
deploy.sh
git pull origin main

docker compose up \
  --build -d

# application-specific steps
# only when the project needs them

docker compose ps
docker compose logs --tail=40

Less ceremony is a feature.

04

from the operator desk

The portion of infrastructure.

Mostly checking things, reading logs, and discovering typos.

host / process viewhtop
Linux htop process and resource monitor
CPU, memory, processes, load.
provider panelhost
VPS provider dashboard showing an active Ubuntu Docker host
The host itself is ordinary: Ubuntu, Docker, console access, backups elsewhere.

OPERATOR NOTES

container rebuilt cleanly.

proxy route checked.

certificate renewal: somebody else's future problem.

it was DNS.

of course it was DNS.

stop adding tools.

05

Security

Small layers

SSH public keys

Administrative access without password logins.

Secrets outside source

Credentials and environment values do not belong in public repositories.

HTTPS at the edge

Certificates terminate at the reverse proxy and renew automatically.

Container separation

Applications carry their own runtime assumptions instead of sharing them globally.

Monitoring

Useful when it answers a question.

06

next shelf

Worth considering when they become useful.

BACKUPS automate more of the recovery path.

HEALTH CHECKS alert only when somebody can act on the result.

INFRASTRUCTURE AS CODE when repetition becomes larger than the configuration itself.

ZERO DOWNTIME DEPLOYMENT when an application needs the requirement.