blob: bd2d3254c4852fb8f8797b29ff14c08f7705c941 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
# 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/<name>`
- `{{.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~~ ✅ FIXED
**Fixed in:** commit c1b0bb8
- Reads actual domain from Caddyfile instead of assuming subdomain
- Works for both apps and static sites
---
## 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/<name>`
### ~~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/`
|