# Ship TODO ## Open ### Support custom Caddyfile in repo **Problem:** v2 always generates Caddyfiles from templates, ignoring any custom config in the repo. **v1 behavior:** Checked for `.ship/Caddyfile` and used it if present. **Proposed:** If `Caddyfile` exists in repo root, use it instead of generating. Support variable substitution: - `{{.RootDir}}` → `/var/www/` - `{{.Port}}` → allocated port - `{{.Domain}}` → site domain This allows custom routes (NIP-05, LNURL, rewrites, etc.) while still letting ship manage deployment. --- ### ship list should show custom domains **Problem:** `ship list` shows internal names (e.g., `ship-593a3d`) but not the actual custom domain mappings (e.g., `checkyourinfo.com`). **Desired:** Show the actual domain in the URL column when `--domain` was used. --- ## Fixed ### ~~Port allocation collision bug~~ ✅ FIXED **Fixed in:** commit d97bb6f - Port allocation now uses atomic flock on `/etc/ship/next_port` - Prevents race conditions when multiple deploys run concurrently - Each app still gets its port stored in `/etc/ship/ports/` ### ~~Docker container port assumption~~ ✅ FIXED **Fixed in:** commit d97bb6f - Added `--container-port` flag (default 80) - Template now uses `{{.ContainerPort}}` instead of hardcoded 80 - Supports containers that listen on 8080, 3000, etc. ### ~~ship host init doesn't create local state.json~~ ✅ FIXED **Fixed in:** commit 6b2c047 - Removed all v1 code (-2837 lines) - Simplified `internal/state/state.go` to just `default_host` + `base_domain` - `host init` now creates minimal state.json - Ports/deploys tracked on server at `/etc/ship/ports/`