diff options
| -rw-r--r-- | TODO.md | 42 |
1 files changed, 15 insertions, 27 deletions
| @@ -1,27 +1,6 @@ | |||
| 1 | # Ship TODO | 1 | # Ship TODO |
| 2 | 2 | ||
| 3 | ## Known Limitations | 3 | ## Open |
| 4 | |||
| 5 | ### Docker Container Port Assumption | ||
| 6 | **Current behavior:** Ship assumes Docker containers listen on port 80 internally. | ||
| 7 | |||
| 8 | **In:** `internal/templates/templates.go`: | ||
| 9 | ``` | ||
| 10 | -p 127.0.0.1:{{.Port}}:80 | ||
| 11 | ``` | ||
| 12 | |||
| 13 | **Problem:** Containers that expose other ports (e.g., 8080, 3000) will not work. | ||
| 14 | |||
| 15 | **Workaround:** Ensure your Docker container listens on port 80, or manually edit the systemd unit after deployment. | ||
| 16 | |||
| 17 | **Potential fixes:** | ||
| 18 | 1. Add `--container-port` flag to specify internal port | ||
| 19 | 2. Auto-detect from Dockerfile `EXPOSE` directive | ||
| 20 | 3. Support `PORT` env var in Docker containers (like binary deploys) | ||
| 21 | |||
| 22 | --- | ||
| 23 | |||
| 24 | ## Other TODOs | ||
| 25 | 4 | ||
| 26 | ### Support custom Caddyfile in repo | 5 | ### Support custom Caddyfile in repo |
| 27 | **Problem:** v2 always generates Caddyfiles from templates, ignoring any custom config in the repo. | 6 | **Problem:** v2 always generates Caddyfiles from templates, ignoring any custom config in the repo. |
| @@ -42,14 +21,23 @@ This allows custom routes (NIP-05, LNURL, rewrites, etc.) while still letting sh | |||
| 42 | 21 | ||
| 43 | **Desired:** Show the actual domain in the URL column when `--domain` was used. | 22 | **Desired:** Show the actual domain in the URL column when `--domain` was used. |
| 44 | 23 | ||
| 45 | ### Port allocation collision bug | 24 | --- |
| 46 | **Problem:** Ship can allocate the same port to multiple deployments, causing containers to fail with exit code 125. | 25 | |
| 26 | ## Fixed | ||
| 47 | 27 | ||
| 48 | **Example:** Both len.to and checkyourinfo.com were assigned port 9000. | 28 | ### ~~Port allocation collision bug~~ ✅ FIXED |
| 29 | **Fixed in:** commit d97bb6f | ||
| 49 | 30 | ||
| 50 | **Fix:** Check if port is actually in use before allocating. | 31 | - Port allocation now uses atomic flock on `/etc/ship/next_port` |
| 32 | - Prevents race conditions when multiple deploys run concurrently | ||
| 33 | - Each app still gets its port stored in `/etc/ship/ports/<name>` | ||
| 51 | 34 | ||
| 52 | --- | 35 | ### ~~Docker container port assumption~~ ✅ FIXED |
| 36 | **Fixed in:** commit d97bb6f | ||
| 37 | |||
| 38 | - Added `--container-port` flag (default 80) | ||
| 39 | - Template now uses `{{.ContainerPort}}` instead of hardcoded 80 | ||
| 40 | - Supports containers that listen on 8080, 3000, etc. | ||
| 53 | 41 | ||
| 54 | ### ~~ship host init doesn't create local state.json~~ ✅ FIXED | 42 | ### ~~ship host init doesn't create local state.json~~ ✅ FIXED |
| 55 | **Fixed in:** commit 6b2c047 | 43 | **Fixed in:** commit 6b2c047 |
