Commit edde78d
ci(deploy): stop inheriting vanilla's fixed host ports (5432/8080/8983/4000)
Root cause of 'Bind for 0.0.0.0:5432 failed: port is already allocated' on 8603,
proven by 'docker compose config' on dev-6:
dspacedb (container_name: dspacedb8603)
ports:
target: 5432, published: "5432" <- vanilla docker-compose-rest.yml
target: 5432, published: "10603" <- /opt/dspace-envs/8603 overlay
Compose MERGES ports lists across -f files instead of replacing them, so the
per-instance overlay adds 10603 but still inherits vanilla's fixed 5432. Those
fixed ports are global to the dev host, so only one instance can own them --
dev-6 currently has customer/jcu holding 0.0.0.0:5432, :8080 and :8983, and
customer/mendelu holding :4000, so 8603 could never bind them.
Add docker/docker-compose-instance-ports.yml, which resets ports to [] between
the vanilla files and the instance overlay; the overlay then supplies the real
instance-scoped ports (10603/6603/11603/4603 for 8603). This keeps the fix in
git rather than requiring /opt/dspace-envs/8603/docker-compose.yml to be patched
on the machine -- mendelu and sav solve the same problem there with
'ports: !override', which is why they publish only 127.0.0.1:105xx.
start.sh took the same treatment: it ran compose with the vanilla files ONLY, so
its 'up' collided too. It now honours INSTANCE_OVERLAY.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent 454df29 commit edde78d
3 files changed
Lines changed: 43 additions & 7 deletions
File tree
- .github/workflows
- build-scripts/run
- docker
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
91 | 91 | | |
92 | 92 | | |
93 | 93 | | |
94 | | - | |
| 94 | + | |
95 | 95 | | |
96 | 96 | | |
| 97 | + | |
97 | 98 | | |
98 | | - | |
| 99 | + | |
99 | 100 | | |
100 | | - | |
| 101 | + | |
101 | 102 | | |
102 | 103 | | |
103 | | - | |
| 104 | + | |
| 105 | + | |
104 | 106 | | |
105 | 107 | | |
106 | 108 | | |
| |||
133 | 135 | | |
134 | 136 | | |
135 | 137 | | |
| 138 | + | |
136 | 139 | | |
137 | 140 | | |
138 | 141 | | |
139 | | - | |
| 142 | + | |
140 | 143 | | |
141 | 144 | | |
142 | 145 | | |
| |||
201 | 204 | | |
202 | 205 | | |
203 | 206 | | |
| 207 | + | |
204 | 208 | | |
205 | 209 | | |
206 | 210 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
13 | 24 | | |
14 | 25 | | |
15 | 26 | | |
16 | 27 | | |
17 | 28 | | |
18 | 29 | | |
19 | | - | |
20 | | - | |
| 30 | + | |
| 31 | + | |
21 | 32 | | |
22 | 33 | | |
23 | 34 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
0 commit comments