Commit Graph
169 Commits
Author SHA1 Message Date
ginnoir 57cd6ed270 refactor: split monolith into per-domain stacks (Phase A: build)
Add stacks/<domain>/ compose + env for the 11 target stacks (proxy, media,
foundry, owncloud, resume, famapp, authentik, notify, monitoring, remote, dev).
Each app stack joins a shared external `edge` network for Caddy and keeps its
DB/cache co-located (no shared backing services). All named volumes convert to
tiered bind mounts: DBs/configs -> /config (SSD), blobs/repos/registry ->
/storage1/labdata (ZFS). Gitea repos+LFS split to ZFS.

Move Vault into the management plane (portainer-compose.yml) and add the shared
`edge` network there. apply-compose.ps1 -Portainer now also pushes vault.hcl.

Additive only: root docker-compose.yml/.env/Caddyfile untouched, so the live
monolith is unchanged. Live cutover (Phase B) is next.
2026-06-04 16:11:31 -05:00
ginnoir e174807481 feat: add full dev stack (Gitea, code-server, registry, DBX, Vault, BookStack, Plane)
- dev-compose.yml: 16-service dev stack on dedicated devstack network
- vault.hcl: Vault file-backend config; Vault initialized and unsealed
- docker-compose.yml: add devstack as external network on caddy
- Caddyfile: LAN-only site blocks for all 7 dev services; Plane routed
  via Caddy path handles (no bundled proxy container)
- apply-compose.ps1: add -DevStack and -VaultUnseal flags
- .env: dev stack secrets + all 5 Vault unseal keys + root token

Dev URLs (LAN-only): gitea, code, registry, dbx, vault, docs, plane
Stack managed by Portainer as dev-stack (id 7)
2026-06-04 15:14:49 -05:00
ginnoir 353263ddf8 refactor: move runner+watchtower to portainer-compose (management plane)
- portainer-compose.yml now owns all three management-plane services:
  portainer, github-runner, watchtower. All mount the docker socket;
  none belong to the application stack.
- Watchtower carries over its existing env (DOCKER_API_VERSION, ntfy URL).
  portainer, runner, and watchtower itself are labeled to opt out of
  watchtower auto-updates.
- docker-compose.yml: remove github-runner (was causing self-kill during
  dc up -d; exclusion workaround no longer needed)
- deploy.yml: simplified back to plain dc up -d with no service filtering
2026-06-04 14:31:33 -05:00
ginnoir 421cde626f chore: add GitHub runner access token to .env 2026-06-04 14:27:18 -05:00
ginnoir c741310a1e fix: exclude github-runner from dc up -d to avoid self-kill during deploy 2026-06-04 14:21:08 -05:00
ginnoir 76487a28c8 feat: move GitHub Actions runner to Docker container
- Replace host systemd runner with myoung34/github-runner container
  in the main compose stack
- Mounts docker.sock (GID 1001), /valhalla-lab, and /config/caddy
  so the workflow can deploy compose and reload Caddy without SSH
- Update deploy.yml to write files via mounted paths and use a shared
  COMPOSE env var for cleaner step commands
- Add GITHUB_RUNNER_ACCESS_TOKEN placeholder to .env (fine-grained PAT
  with Administration:write needed for runner self-registration)
2026-06-04 14:15:44 -05:00
ginnoir 8560bf0f34 chore: opt into Node.js 24 for actions runner before June 16 forced migration 2026-06-04 14:09:03 -05:00
ginnoir 1ed7e93298 feat: add GitHub Actions runner workflow and fix portainer network race
- portainer-compose.yml: moves portainer from standalone container to
  compose-managed, giving the portainer_proxy network a compose owner.
  This ensures the network is reliably created before the main stack
  on fresh installs or after Docker state is wiped.
- .github/workflows/deploy.yml: self-hosted runner on valhalla runs
  dc pull + up on push to main, and hot-reloads Caddyfile.
- apply-compose.ps1: adds -Portainer flag to manage portainer-compose.yml.
2026-06-04 14:06:02 -05:00
ginnoir bb46b1c10e feat: migrate stack to Portainer git-managed, rename project to valhalla-lab
- Rename project from htpc-download-box to valhalla-lab (directory + dc alias)
- Remove portainer and watchtower from compose; run standalone outside managed stack
  to prevent self-termination during Portainer-triggered redeployments
- Add portainer_proxy external network shared by caddy and standalone portainer
  so Caddy can route to Portainer via Docker DNS without them being in the same stack
- Carve out POST /api/stacks/webhooks/* in Caddyfile so Portainer webhooks can
  reach through the internal_only guard without exposing the full UI
- Update apply-compose.ps1 and sync-prod.ps1 paths from htpc-download-box to valhalla-lab
2026-06-03 23:09:53 -05:00
ginnoir 8558872362 chore: consistency pass — restart policies, backdoor ports, remove dead services
docker-compose.yml:
- Remove jackett and nzbhydra2 services
- Fix restart: "no" → unless-stopped on deluge, nzbget, sonarr, radarr, bazarr, tautulli
- Fix restart: always → unless-stopped on owncloud, mariadb (owncloud), redis (owncloud)
- Add backdoor host ports: portainer 9100:9000, uptime-kuma 3001:3001, homarr 7575:7575

Caddyfile:
- Remove jackett.ginnoir.com and hydra.ginnoir.com blocks
- Drop stray @httpget redirect blocks from freshrss, resume, storage.j-costa.com
- Simplify resume.ginnoir.com (drop redundant https:// host alias)
- Fix tab indentation in j-costa.com and storage.j-costa.com tls blocks
- Fix space indent in dev.ginnoir.com

.env:
- Remove unused famapp_MINIO_ENDPOINT (hardcoded in compose)
- Remove unused NEXT_PUBLIC_APP_URL
2026-06-03 22:22:35 -05:00
ginnoir ea669e815c refactor: move homarr SECRET_ENCRYPTION_KEY to .env
Define HOMARR_SECRET_ENCRYPTION_KEY in .env and reference it from docker-compose.yml instead of hardcoding it inline, keeping all secrets in .env. Resolved value is unchanged (no container recreate); deployed to valhalla and validated with 'dc config homarr'.
2026-06-03 04:21:33 -05:00
ginnoir 16b08bad8a feat: add management stack (portainer, uptime-kuma, homarr)
Add portainer, uptime-kuma, and homarr on a new 'management' network, with caddy joined to it and internal-only Caddy routes for portainer/uptime/homarr/router. Widen the internal_only allowlist to also accept 172.16.0.0/12 (Docker networks) and 127.0.0.1 so container-originated and local checks pass the LAN gate.
2026-06-03 04:06:55 -05:00
ginnoir 24e0f870dd fix: set DOCKER_API_VERSION=1.40 for watchtower compatibility with Docker 29
Watchtower's latest image defaults to API version 1.25; Docker 29 raised
its minimum supported client API to 1.40, causing watchtower to crash on
every start. Setting DOCKER_API_VERSION=1.40 via env var overrides the
default without requiring a newer watchtower image.
2026-06-02 23:08:37 -05:00
ginnoir 20165f48a0 chore: explicit container_name on every service, document compose v2 migration
Every service now has an explicit container_name, eliminating the
htpc-download-box_ prefix/suffix that compose derived from the directory.
Disambiguated duplicates follow type_context naming:
  postgres_resume / postgres_famapp / postgres_authentik
  minio_resume / minio_famapp
  redis_authentik

Also updates CLAUDE.md and the homelab-ssh skill to reflect:
- compose v2 (docker compose, space) replacing the old v1.27.4 standalone
- dc alias updated to docker compose
- htpc-download-box directory is now clean (legacy cruft removed)

Server-side migration steps (docker-compose-plugin apt install, alias
update, Docker Engine upgrade, old binary removal) are documented in
the session but not yet applied — run apply-compose.ps1 -Compose after
completing them.
2026-06-02 22:58:23 -05:00
ginnoir 41685b3763 Merge branch 'main' of https://github.com/ginnoir/homelabstack 2026-06-02 22:36:35 -05:00
ginnoir b18240f4ae chore: gitignore .claude/settings.local.json (personal override) 2026-06-02 22:34:07 -05:00
ginnoir e841334316 fix: split ambiguous AUTH_SECRET and remove dead Matrix routes
RESUME_AUTH_SECRET and FAMAPP_AUTH_SECRET now replace the bare AUTH_SECRET (previously defined 3x in .env, last-wins). Each is pinned to the value its container is already running, so re-applying recreated nothing. This fixes resume's app reading \\\, which was undefined and resolved to an empty string -- the next container recreate would have wiped all resume sessions. Caddyfile: removed matrix.ginnoir.com and the ginnoir.com apex .well-known/matrix block (no Synapse backend on :8008). Applied to valhalla: dc config resolves with no warnings, Caddy reloaded, dc up -d left every service up-to-date.
2026-06-02 22:33:59 -05:00
ginnoir 56d834ede9 chore: initial homelab stack config and sync tooling
Mirror the three production files (docker-compose.yml, .env, Caddyfile) that live on valhalla, plus the push/pull PowerShell scripts, CLAUDE.md, .gitignore/.gitattributes, and .claude/skills for ssh/apply/sync.
2026-06-02 22:12:07 -05:00
ginnoirandGitHub beee57607f Initial commit 2026-06-02 21:32:30 -05:00