diff options
| author | Clawd <ai@clawd.bot> | 2026-02-17 07:51:44 -0800 |
|---|---|---|
| committer | Clawd <ai@clawd.bot> | 2026-02-17 07:51:44 -0800 |
| commit | 5e5de4ea1aa98f75d470e4a61644d4b9f100c4b0 (patch) | |
| tree | 6dec3d1d424a40c5ac464ee88db964f692c4a7c5 | |
| parent | 1f9c91c4d7152751190bb17a37f2f8724e4cad7b (diff) | |
Update TODO #2: simplify local state, remove v1 cruft
| -rw-r--r-- | TODO.md | 12 |
1 files changed, 8 insertions, 4 deletions
| @@ -54,16 +54,20 @@ This allows custom routes (NIP-05, LNURL, rewrites, etc.) while still letting sh | |||
| 54 | ### ship host init doesn't create local state.json | 54 | ### ship host init doesn't create local state.json |
| 55 | **Problem:** After `ship host init`, the local `~/.config/ship/state.json` isn't created with the base_domain. Deploys fail with "HOST_NOT_CONFIGURED". | 55 | **Problem:** After `ship host init`, the local `~/.config/ship/state.json` isn't created with the base_domain. Deploys fail with "HOST_NOT_CONFIGURED". |
| 56 | 56 | ||
| 57 | **Workaround:** Manually create `~/.config/ship/state.json`: | 57 | **Design:** v2 uses remote state (`/etc/ship/ports/` on server) for port allocation and app tracking. Local state only needs: |
| 58 | - `default_host` — which host to use when `--host` isn't specified | ||
| 59 | - `base_domain` — for generating URLs | ||
| 60 | |||
| 61 | **Fix:** `ship host init` should create minimal local state: | ||
| 58 | ```json | 62 | ```json |
| 59 | { | 63 | { |
| 60 | "default_host": "alaskav6", | 64 | "default_host": "alaskav6", |
| 61 | "hosts": { | 65 | "hosts": { |
| 62 | "alaskav6": { | 66 | "alaskav6": { |
| 63 | "next_port": 8001, | 67 | "base_domain": "northwest.io" |
| 64 | "base_domain": "northwest.io", | ||
| 65 | "apps": {} | ||
| 66 | } | 68 | } |
| 67 | } | 69 | } |
| 68 | } | 70 | } |
| 69 | ``` | 71 | ``` |
| 72 | |||
| 73 | **Also:** Clean up `internal/state/state.go` — remove `next_port`, `apps`, `AllocatePort()`, and other v1 cruft. Keep it minimal. | ||
