diff options
Diffstat (limited to 'TODO.md')
| -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. | ||
