Author SHA1 Message Date
kiskaadee 1814ba9a4a fix(armonia): align data mount, host UID/GID, and API image defaults
- armonia/docker-compose.yml: bind-mount ../../var/lib/homelab/armonia/data:/data instead of ./data:/data to prevent root-owned SQLite DB creation and match nixos-core path rules
- armonia/docker-compose.yml & armonia/.env-example: set default PUID/PGID to 1001/988 (operator:homelab-operators) so armonia-api can write /data/armonia.db
- armonia/docker-compose.yml & armonia/.env-example: update default ARMONIA_API_IMAGE to homelab-armonia-armonia-api:latest
2026-11-19 17:55:56 -05:00
kiskaadee 4117d47ddf fix(jellyfin): point mounts to var/lib/homelab and align PUID/PGID
- Update jellyfin/docker-compose.yml bind mounts from ./{config,cache,media} to ../../var/lib/homelab/jellyfin/{config,cache,media} so SQLite data persists on host-owned state and passes validate_compose_security.
- Align PUID/PGID defaults to 1001:988 (operator:homelab-operators) in jellyfin/docker-compose.yml and jellyfin/.env-example to prevent SQLite readonly database exit 139.
- Align CERT_RESOLVER default in jellyfin/.env-example to myresolver and update jellyfin/README.md volume paths.
2026-11-19 17:54:48 -05:00
kiskaadee f0b2acfda8 chore(workloads): ignore .venv symlink in .gitignore 2026-11-19 17:46:33 -05:00
kiskaadee e8033baf9f docs(workloads): clarify deployment aliases in README and gitignore .venv
- Remove 'legacy webhook' phrasing from README.md deployments.yaml description
- Add .venv/ to .gitignore
2026-11-19 17:46:08 -05:00
kiskaadee 2a33cb2aa8 Merge pull request 'feat(snappymail): mount persistent state under homelab state root' (#9) from feat/snappymail-cutover into main 2026-11-19 22:04:02 +00:00
kiskaadee 8da3e16f21 feat(snappymail): mount persistent state under homelab state root
- Update snappymail/docker-compose.yml volume mount from ./data to ../../var/lib/homelab/snappymail so state resolves cleanly under appctl_router.py without HOME or ${...} interpolation.
2026-11-19 15:47:36 -05:00
kiskaadee 60aa540797 Merge pull request 'feat(gitea,gitea_runner): configure persistent state mounts and host-mode Nix runner' (#8) from feat/gitea-cutover into main 2026-11-19 09:29:21 -05:00
kiskaadee 75f2149275 fix(gitea_runner): pin act_runner 0.6.1 and wrap entrypoint with tini 2026-11-19 00:18:13 -05:00
kiskaadee 45a9450526 fix(gitea,gitea_runner): use relative state mounts and nix-independent runner base
- Replace ~/var/lib/homelab/<app> with ../../var/lib/homelab/<app> in gitea and gitea_runner compose files so docker compose resolves state without HOME
- Remove inert HOMELAB_STATE_ROOT from gitea_runner/.env-example and update gitea_runner/README.md
- Rebase gitea_runner/Dockerfile on gitea/act_runner:latest with Alpine nodejs/git/bash/coreutils, regular-file /etc/nix/nix.conf, pinned nixos/nix:2.24.12 store, and entrypoint-nix.sh auto-seed wrapper
2026-11-18 23:03:22 -05:00
kiskaadee d534399549 feat(gitea_runner): configure host-mode Nix runner with persistent store
- Add gitea_runner/Dockerfile combining nixos/nix (flakes + nodejs + /bin/sleep) with act_runner binary and entrypoint
- Update gitea_runner/docker-compose.yml to build locally, mount ~/var/lib/homelab/gitea_runner:/data and nix-store:/nix, remove DOCKER_HOST, and use :host runner labels
- Add compose_build to gitea_runner/app.yaml deployment actions
- Document runtime env vars and host-mode architecture in gitea_runner/.env-example and README.md
2026-11-18 22:45:02 -05:00
kiskaadee e42782f2f2 feat(gitea): mount persistent state under homelab state root 2026-11-18 22:41:43 -05:00
kiskaadee 4c968752b9 chore(deployments): remove legacy aliases from deployments.yaml 2026-11-18 21:11:29 -05:00
kiskaadee fda2e9db4e Merge pull request 'chore(workloads): reconcile monorepo baseline, add deployments.yaml and keeper manifests' (#6) from refactor/monorepo-baseline into main 2026-11-18 21:02:26 -05:00
16 changed files with 86 additions and 30 deletions

No files matched your search

+1
View File
@@ -1,3 +1,4 @@
__pycache__/
**/data/
.internal/
.venv
+1 -1
View File
@@ -8,7 +8,7 @@ This repository contains the decoupled, portable application stacks managed by t
Each workload lives in its own top-level directory with a declarative `app.yaml` manifest (`schemaVersion: "1.0"`) and a `docker-compose.yml` baseline. Workloads attach to the shared external Docker network (`proxy-net`) and expose Traefik routing labels parameterized via runtime environment variables.
The root [`deployments.yaml`](deployments.yaml) serves as the authoritative workload admission registry, mapping each workload identity and its legacy webhook aliases to `~/Workloads/<app>`.
The root [`deployments.yaml`](deployments.yaml) serves as the authoritative workload admission registry, mapping each workload identity and its aliases to `~/Workloads/<app>`.
---
+3 -3
View File
@@ -3,7 +3,7 @@
DASHBOARD_REPO_URL=https://git.example.com/org/armonia-dashboard.git
DASHBOARD_REF=main
# Pre-built container image reference for armonia-api
ARMONIA_API_IMAGE=armonia-api:latest
ARMONIA_API_IMAGE=homelab-armonia-armonia-api:latest
# --- Runtime & Database ---
ENVIRONMENT=production
@@ -22,8 +22,8 @@ AUTH_MIDDLEWARE=authelia-auth@docker
HTTPS_REDIRECT_MIDDLEWARE=https-redirect@docker
# --- User/Group IDs ---
PUID=1000
PGID=1000
PUID=1001
PGID=988
# --- Application Settings ---
THERAPIST_NAME=
+3 -3
View File
@@ -1,11 +1,11 @@
services:
armonia-api:
image: ${ARMONIA_API_IMAGE:-armonia-api:latest}
image: ${ARMONIA_API_IMAGE:-homelab-armonia-armonia-api:latest}
container_name: ${ARMONIA_API_CONTAINER:-armonia-api}
user: "${PUID:-1000}:${PGID:-1000}"
user: "${PUID:-1001}:${PGID:-988}"
restart: unless-stopped
volumes:
- ./data:/data
- ../../var/lib/homelab/armonia/data:/data
environment:
- ENVIRONMENT=${ENVIRONMENT:-production}
- APP_ENV=${APP_ENV:-production}
-6
View File
@@ -7,7 +7,6 @@ repositories:
path: "~/Workloads/gitea"
aliases:
- "git"
- "homelab-gitea"
gitea_runner:
path: "~/Workloads/gitea_runner"
aliases:
@@ -22,10 +21,5 @@ repositories:
path: "~/Workloads/jellyfin"
aliases:
- "media"
- "homelab-jellyfin"
armonia:
path: "~/Workloads/armonia"
aliases:
- "armonia-del-ser"
- "jasmin"
- "homelab-armonia"
+1 -1
View File
@@ -18,7 +18,7 @@ services:
ports:
- "${SSH_PORT:-2223}:22"
volumes:
- ./data:/data
- ../../var/lib/homelab/gitea:/data
networks:
- proxy-net
labels:
+5
View File
@@ -0,0 +1,5 @@
# Gitea Actions Runner environment variables (injected at runtime; never commit real tokens)
GITEA_INSTANCE_URL=http://gitea:3000
GITEA_RUNNER_TOKEN=replace-with-gitea-runner-registration-token
GITEA_RUNNER_NAME=homelab-runner
GITEA_RUNNER_LABELS=ubuntu-latest:host,nix:host
+23
View File
@@ -0,0 +1,23 @@
FROM nixos/nix:2.24.12 AS nix-src
RUN tar -czf /nix-seed.tar.gz -C /nix .
FROM gitea/act_runner:0.6.1
RUN apk add --no-cache nodejs npm bash git coreutils ca-certificates
# Regular file (never a symlink into /nix/store) so nix-store volume mounts cannot break it
RUN mkdir -p /etc/nix /nix && \
printf '%s\n' \
'sandbox = false' \
'experimental-features = nix-command flakes' \
'trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=' \
> /etc/nix/nix.conf
COPY --from=nix-src /nix /nix
COPY --from=nix-src /nix-seed.tar.gz /opt/nix-seed.tar.gz
COPY entrypoint-nix.sh /usr/local/bin/entrypoint-nix.sh
RUN chmod +x /usr/local/bin/entrypoint-nix.sh
ENV PATH="/usr/local/bin:/nix/var/nix/profiles/default/bin:/usr/bin:/bin"
ENTRYPOINT ["/sbin/tini", "--", "/usr/local/bin/entrypoint-nix.sh"]
+19
View File
@@ -0,0 +1,19 @@
# Gitea Actions Runner (`gitea_runner`)
Standalone `act_runner` for Gitea Actions, built with Nix (`nix-command` and `flakes` enabled), `git`, `bash`, and `nodejs` for **host-mode (`:host`)** execution.
## Architecture
- **Host-Mode Execution (`:host`)**: Core platform security bans direct Docker socket mounts and enforces a read-only `socket-proxy` (`POST=0`), so `act_runner` cannot spawn `docker://` job containers. Jobs run directly inside the runner container via `:host` labels (`ubuntu-latest:host,nix:host`).
- **Persistent State & Nix Cache**:
- Runner registration and workspace state: `../../var/lib/homelab/gitea_runner:/data` (resolves relative to `~/Workloads/gitea_runner` to `~/var/lib/homelab/gitea_runner` without requiring `HOME` or `${...}` interpolation).
- Nix store cache: named Docker volume `nix-store:/nix` so evaluated derivations persist across rebuilds. If `/nix/var/nix/profiles/default/bin/nix` is missing or broken on an existing volume, `entrypoint-nix.sh` seeds `/nix` from `/opt/nix-seed.tar.gz`.
## Configuration
See [`.env-example`](.env-example) for required runtime variables:
- `GITEA_INSTANCE_URL`: Internal or external Gitea URL (default `http://gitea:3000` over `proxy-net`).
- `GITEA_RUNNER_TOKEN`: One-time runner registration token (injected into `GITEA_RUNNER_REGISTRATION_TOKEN` in Compose).
- `GITEA_RUNNER_NAME`: Runner display name (default `homelab-runner`).
- `GITEA_RUNNER_LABELS`: Comma-separated `:host` labels (default `ubuntu-latest:host,nix:host`).
+1
View File
@@ -14,4 +14,5 @@ deployment:
branch: "main"
actions:
- git_pull
- compose_build
- compose_up
+9 -5
View File
@@ -1,19 +1,23 @@
services:
gitea_runner:
image: gitea/act_runner:${ACT_RUNNER_VERSION:-latest}
container_name: ${CONTAINER_NAME:-gitea-runner}
build: .
image: ${RUNNER_IMAGE:-gitea-runner:local}
container_name: ${CONTAINER_NAME:-gitea_runner}
restart: unless-stopped
environment:
- GITEA_INSTANCE_URL=${GITEA_INSTANCE_URL:-http://gitea:3000}
- GITEA_RUNNER_REGISTRATION_TOKEN=${GITEA_RUNNER_TOKEN:-}
- GITEA_RUNNER_NAME=${GITEA_RUNNER_NAME:-homelab-runner}
- GITEA_RUNNER_LABELS=${GITEA_RUNNER_LABELS:-ubuntu-latest:docker://ghcr.io/catthehacker/ubuntu:act-latest,ubuntu-22.04:docker://ghcr.io/catthehacker/ubuntu:act-latest}
- DOCKER_HOST=${DOCKER_HOST:-tcp://docker-socket-proxy:2375}
- GITEA_RUNNER_LABELS=${GITEA_RUNNER_LABELS:-ubuntu-latest:host,nix:host}
volumes:
- ./data:/data
- ../../var/lib/homelab/gitea_runner:/data
- nix-store:/nix
networks:
- proxy-net
volumes:
nix-store: {}
networks:
proxy-net:
name: ${PROXY_NETWORK:-proxy-net}
+9
View File
@@ -0,0 +1,9 @@
#!/usr/bin/env bash
set -euo pipefail
if [ ! -x /nix/var/nix/profiles/default/bin/nix ] || ! /nix/var/nix/profiles/default/bin/nix --version >/dev/null 2>&1; then
echo "[entrypoint-nix] /nix/var/nix/profiles/default/bin/nix missing or broken; seeding /nix from /opt/nix-seed.tar.gz..." >&2
tar -xzf /opt/nix-seed.tar.gz -C /nix
fi
exec /usr/local/bin/run.sh "$@"
+3 -3
View File
@@ -6,8 +6,8 @@ SERVICE_DOMAIN=jellyfin.example.com
TZ=UTC
# --- User/Group IDs ---
PUID=1000
PGID=1000
PUID=1001
PGID=988
# --- Path Configuration ---
MEDIA_PATH=/path/to/your/media
@@ -16,7 +16,7 @@ MEDIA_PATH=/path/to/your/media
PROXY_NETWORK=proxy-net
HTTP_ENTRYPOINT=web
HTTPS_ENTRYPOINT=websecure
CERT_RESOLVER=letsencrypt
CERT_RESOLVER=myresolver
# --- Security & Performance ---
RATE_LIMIT_AVG=100
+3 -3
View File
@@ -19,6 +19,6 @@ Refer to the root [README.md](../README.md) for details on how environment varia
## 📦 Volumes
- `./config`: Application data and configuration.
- `./cache`: Metadata and transcode cache.
- `${MEDIA_PATH}`: Media library (mounted read-only).
- `../../var/lib/homelab/jellyfin/config`: Application data and configuration.
- `../../var/lib/homelab/jellyfin/cache`: Metadata and transcode cache.
- `../../var/lib/homelab/jellyfin/media`: Media library (mounted read-only).
+4 -4
View File
@@ -2,13 +2,13 @@ services:
jellyfin:
image: jellyfin/jellyfin:${IMAGE_TAG:-latest}
container_name: ${CONTAINER_NAME:-jellyfin}
user: "${PUID:-1000}:${PGID:-1000}"
user: "${PUID:-1001}:${PGID:-988}"
environment:
- TZ=${TZ:-UTC}
volumes:
- ./config:/config
- ./cache:/cache
- ./media:/media:ro
- ../../var/lib/homelab/jellyfin/config:/config
- ../../var/lib/homelab/jellyfin/cache:/cache
- ../../var/lib/homelab/jellyfin/media:/media:ro
restart: unless-stopped
networks:
- proxy-net
+1 -1
View File
@@ -4,7 +4,7 @@ services:
container_name: ${CONTAINER_NAME:-snappymail}
restart: unless-stopped
volumes:
- ./data:/var/lib/snappymail/_data_
- ../../var/lib/homelab/snappymail:/var/lib/snappymail/_data_
networks:
- proxy-net
labels: