Remove broken gen-env.sh and update CLAUDE.md

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Samantha Atkins 2026-03-29 04:00:21 -04:00
parent f3017b9ab5
commit 92f19b36d2
2 changed files with 3 additions and 24 deletions

View file

@ -11,18 +11,15 @@ Proxmox VE homelab cluster running Docker Swarm services. Three Proxmox hosts (p
All services deploy as Docker Swarm stacks from the manager node (pve-postgres). The active service definitions are in `proxmox/services/`. The `services/` directory contains older pre-migration copies. All services deploy as Docker Swarm stacks from the manager node (pve-postgres). The active service definitions are in `proxmox/services/`. The `services/` directory contains older pre-migration copies.
```bash ```bash
# Generate env var prefix from pass (run locally) # Copy yml to manager and deploy (resolve secrets from pass inline)
./proxmox/services/gen-env.sh <service.yml>
# Copy yml to manager and deploy
scp proxmox/services/<service>.yml pve-postgres:~/ scp proxmox/services/<service>.yml pve-postgres:~/
ssh pve-postgres "<ENV_VARS> docker stack deploy -c <service>.yml <stack_name>" ssh pve-postgres "VAR=$(pass homelab/VAR) docker stack deploy -c <service>.yml <stack_name>"
# Remove a stack # Remove a stack
ssh pve-postgres "docker stack rm <stack_name>" ssh pve-postgres "docker stack rm <stack_name>"
``` ```
Secrets come from `pass` under the `homelab/` prefix. Use `gen-env.sh` to extract required `${VAR}` references from a yml and resolve them. Never hardcode secrets in files. Secrets come from `pass` under the `homelab/` prefix. Resolve them inline when deploying. Never hardcode secrets in files.
## Service YML Conventions ## Service YML Conventions
@ -51,7 +48,6 @@ Use SSH config aliases (`pve-postgres`, `pve-tools`, `adder-ghost`, `pve`, `adde
## Key Files ## Key Files
- `proxmox/services/*.yml` — Active swarm stack definitions - `proxmox/services/*.yml` — Active swarm stack definitions
- `proxmox/services/gen-env.sh` — Extracts env vars from yml, resolves from `pass homelab/`
- `proxmox/services/nats.conf` — NATS server config (JetStream, websocket, monitoring) - `proxmox/services/nats.conf` — NATS server config (JetStream, websocket, monitoring)
- `proxmox/services/01-init.sql` — Postgres init script (creates users/databases) - `proxmox/services/01-init.sql` — Postgres init script (creates users/databases)
- `proxmox/post_init_node.org` — Fresh Proxmox node setup steps - `proxmox/post_init_node.org` — Fresh Proxmox node setup steps

View file

@ -1,17 +0,0 @@
#!/usr/bin/env bash
set -uo pipefail
if [ $# -eq 0 ]; then
echo "Usage: gen-env.sh <service.yml>"
exit 1
fi
PREFIX="homelab"
out=""
for var in $(sed -n 's/.*\${{\([A-Z_]*\)}}.*/\1/p' "$1" | grep -v OVERLAY_NETWORK | sort -u); do
val=$(pass "$PREFIX/$var" 2>/dev/null) || continue
out+="$var=$val "
done
echo "$out"