# kanrisha Kanrisha (custom application) deployed as a Docker Compose stack behind Caddy, running on a **ScoutFS** filesystem. **Alma / Rocky Linux only** for now — it installs ScoutFS (a RHEL-only kernel filesystem) and a host package set via `dnf`. > **Status:** the host-prep half (phase 1) is complete; the application stack > (phase 2) is scaffolded with a **stub** `docker-compose.yml` / `Caddyfile` > pending the real Kanrisha compose file. See the TODOs in those files. ## Two-phase deploy Kanrisha runs on a ScoutFS filesystem you create by hand (it depends on your storage layout), so [`deploy.sh`](deploy.sh) is split into two phases and runs whichever fits when you invoke it — decided by whether `SCOUTFS_PATH` points at a live ScoutFS mount. **Phase 1 — host prep (automated):** 1. `dnf install epel-release` 2. `dnf install git tar sparse mt-st mtx sg3_utils pciutils mbuffer wget curl zstd jq bash-completion sos lsof` 3. Install Docker. 4. Install ScoutFS: `curl -fsSL https://rpm-1.srvno.de/setup-scoutfs.sh | bash -s -- --license ` 5. Print the steps to create your ScoutFS filesystem, then stop. **You do (manual):** create + mount a ScoutFS filesystem, e.g. at `/mnt/kanrisha` (and add it to `/etc/fstab`). **Phase 2 — deploy the stack (automated):** lay down the compose + Caddyfile, seed `.env`, open 80/443, pull images, bring the stack up behind Caddy/TLS. ## Required values | Variable | Phase | Notes | |----------|-------|-------| | `SCOUTFS_LICENSE` | 1 | License key for `setup-scoutfs.sh`. Prompted, or set in `globals/globals.env`. | | `SCOUTFS_PATH` | 2 | Absolute path to the mounted ScoutFS filesystem. Its presence is what triggers phase 2. | | `KANRISHA_DOMAIN` | 2 | Public hostname (e.g. `kanrisha.example.com`). | | `ACME_EMAIL` | 2 | Let's Encrypt registration email. | See [`.env.example`](.env.example) for image tags. ## Deploy ```bash ./automations.sh # Deploy on this host → deploy: kanrisha ``` Or build + run the self-contained artifact: ```bash ./build.sh scp deploy.sh root@host: ssh root@host 'bash deploy.sh' # phase 1 (prompts for license) # ... create + mount your ScoutFS filesystem on the host ... ssh root@host 'SCOUTFS_PATH=/mnt/kanrisha KANRISHA_DOMAIN=kanrisha.example.com \ ACME_EMAIL=me@example.com bash deploy.sh' # phase 2 ``` Unattended provisioning (phase 1): [`cloud-init.yml`](cloud-init.yml). ## Notes - **Rebuild after editing loose files.** `docker-compose.yml`, `Caddyfile`, and `.env.example` are embedded into `deploy.sh` by [`build.sh`](build.sh); re-run it after any edit or the deploy ships the stale copy. - DNS for `KANRISHA_DOMAIN` must resolve to the host and 80/443 be reachable before phase 2, or the Let's Encrypt cert request fails. - The ScoutFS `mkfs`/`mount` recipe in the phase-1 handoff is a placeholder — fill in your canonical commands.