From 0f01f8bc0a8ac10b3c36e66fe66b4df89a049c6ae580dda3389bffcae693c0d0 Mon Sep 17 00:00:00 2001 From: pln Date: Sun, 15 Mar 2026 18:03:08 +0100 Subject: [PATCH] Update CLAUDE.md with pod script conventions and service inventory Co-Authored-By: Claude Opus 4.6 (1M context) --- CLAUDE.md | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index 52e6e20..b9a2f97 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -4,9 +4,28 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co ## Overview -This is a personal `~/bin` utilities repository. It is currently empty and ready for scripts and tools. +Personal `~/bin` repository containing Podman pod creation scripts for self-hosted services on a Linux server. Each script creates a rootless Podman pod with systemd user service integration. -## Conventions +## Repository - Main branch: `main` -- Scripts should be executable and include appropriate shebangs +- Remote: `ssh://git@git.destengs.com:8085/pln/bin.git` (Gitea) +- Run by user `pln` with rootless Podman permissions + +## Shell script conventions + +All pod creation scripts follow the same pattern (see existing scripts and examples in `/home/lwc/bin/create_pod_langflow.sh`, `/home/krt/bin/create_pod_qdrant.sh`): + +- Naming: `create_pod_.sh` +- `#!/bin/bash` shebang with `set -e` +- Variables declared at top: `POD_NAME`, `CTR_NAME`, container images with pinned tags, ports, bind dirs +- Data persisted under `$HOME/.local/share//` +- Pod ports bound to `127.0.0.1` (localhost only) +- Containers removed and recreated on each run (idempotent) +- Systemd user service files generated via `podman generate systemd --name --new --files` +- Pod stopped/removed after systemd generation, then re-started via `systemctl --user enable --now` +- Readiness check loop using `curl` with 30 attempts, 2s interval + +## Current services + +- **AFFiNE** (`create_pod_affine.sh`): AFFiNE v0.26.3 with pgvector/PostgreSQL and Redis. Web UI on port 8092, GraphQL API at `/graphql`.