diff options
Diffstat (limited to 'TODO.md')
| -rw-r--r-- | TODO.md | 25 |
1 files changed, 6 insertions, 19 deletions
| @@ -51,23 +51,10 @@ This allows custom routes (NIP-05, LNURL, rewrites, etc.) while still letting sh | |||
| 51 | 51 | ||
| 52 | --- | 52 | --- |
| 53 | 53 | ||
| 54 | ### ship host init doesn't create local state.json | 54 | ### ~~ship host init doesn't create local state.json~~ ✅ FIXED |
| 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 | **Fixed in:** commit 6b2c047 |
| 56 | |||
| 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: | ||
| 62 | ```json | ||
| 63 | { | ||
| 64 | "default_host": "alaskav6", | ||
| 65 | "hosts": { | ||
| 66 | "alaskav6": { | ||
| 67 | "base_domain": "northwest.io" | ||
| 68 | } | ||
| 69 | } | ||
| 70 | } | ||
| 71 | ``` | ||
| 72 | 56 | ||
| 73 | **Also:** Clean up `internal/state/state.go` — remove `next_port`, `apps`, `AllocatePort()`, and other v1 cruft. Keep it minimal. | 57 | - Removed all v1 code (-2837 lines) |
| 58 | - Simplified `internal/state/state.go` to just `default_host` + `base_domain` | ||
| 59 | - `host init` now creates minimal state.json | ||
| 60 | - Ports/deploys tracked on server at `/etc/ship/ports/` | ||
