Commit 5803237
committed
New preflight in src/cli/install_runner.rs:
1. parse_compose_host_port() — parses both string (127.0.0.1:3000:80) and mapping ({published: 3000}) compose port entries
2. collect_compose_host_port_services() — reads the compose file and returns all (host_port, service_name) pairs
3. get_own_compose_running_ports() — runs docker compose ps --format {{.Ports}} to discover ports currently held by this project's own containers (to avoid false positives on redeploys)
4. check_local_host_port_conflicts() — TCP-binds each declared port; if a bind fails AND the port isn't owned by the project's own containers, it's flagged as a real conflict
5. LocalDeploy::deploy() — calls the check before docker compose up; if conflicts are found, it returns a clear error like:
Host port conflict detected before deploy:
• port 3000 (service 'status-panel-web') is already allocated on this host — find the owner with: lsof -nP -iTCP:3000 -sTCP:LISTEN
Stop the conflicting process or change the port in stacker.yml, then retry.1 parent c78352a commit 5803237
7 files changed
Lines changed: 635 additions & 30 deletions
File tree
- docker/dev
- src
- cli
- generator
- connectors
- routes/project
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
3 | 1 | | |
4 | 2 | | |
5 | 3 | | |
| |||
8 | 6 | | |
9 | 7 | | |
10 | 8 | | |
11 | | - | |
| 9 | + | |
12 | 10 | | |
13 | | - | |
14 | 11 | | |
15 | 12 | | |
16 | 13 | | |
17 | 14 | | |
18 | 15 | | |
19 | | - | |
20 | 16 | | |
21 | | - | |
22 | 17 | | |
23 | | - | |
24 | | - | |
| 18 | + | |
| 19 | + | |
25 | 20 | | |
26 | 21 | | |
27 | 22 | | |
28 | 23 | | |
| 24 | + | |
29 | 25 | | |
30 | 26 | | |
31 | 27 | | |
32 | | - | |
| 28 | + | |
33 | 29 | | |
34 | | - | |
| 30 | + | |
35 | 31 | | |
36 | 32 | | |
37 | 33 | | |
| |||
41 | 37 | | |
42 | 38 | | |
43 | 39 | | |
44 | | - | |
| 40 | + | |
45 | 41 | | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
50 | 46 | | |
51 | 47 | | |
52 | 48 | | |
53 | 49 | | |
54 | 50 | | |
55 | 51 | | |
56 | 52 | | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | 53 | | |
62 | 54 | | |
63 | 55 | | |
64 | 56 | | |
65 | 57 | | |
66 | 58 | | |
67 | 59 | | |
68 | | - | |
69 | | - | |
70 | | - | |
| 60 | + | |
71 | 61 | | |
72 | 62 | | |
73 | 63 | | |
| |||
76 | 66 | | |
77 | 67 | | |
78 | 68 | | |
79 | | - | |
| 69 | + | |
80 | 70 | | |
81 | 71 | | |
82 | | - | |
| 72 | + | |
83 | 73 | | |
84 | 74 | | |
85 | 75 | | |
86 | 76 | | |
87 | 77 | | |
88 | 78 | | |
89 | | - | |
| 79 | + | |
90 | 80 | | |
91 | 81 | | |
92 | 82 | | |
| |||
105 | 95 | | |
106 | 96 | | |
107 | 97 | | |
108 | | - | |
109 | | - | |
| 98 | + | |
| 99 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1216 | 1216 | | |
1217 | 1217 | | |
1218 | 1218 | | |
| 1219 | + | |
1219 | 1220 | | |
1220 | 1221 | | |
1221 | 1222 | | |
| |||
1275 | 1276 | | |
1276 | 1277 | | |
1277 | 1278 | | |
| 1279 | + | |
| 1280 | + | |
| 1281 | + | |
| 1282 | + | |
| 1283 | + | |
1278 | 1284 | | |
1279 | 1285 | | |
1280 | 1286 | | |
| |||
1364 | 1370 | | |
1365 | 1371 | | |
1366 | 1372 | | |
1367 | | - | |
| 1373 | + | |
1368 | 1374 | | |
1369 | 1375 | | |
1370 | 1376 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
106 | 106 | | |
107 | 107 | | |
108 | 108 | | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
109 | 116 | | |
110 | 117 | | |
111 | 118 | | |
| |||
736 | 743 | | |
737 | 744 | | |
738 | 745 | | |
| 746 | + | |
| 747 | + | |
| 748 | + | |
| 749 | + | |
| 750 | + | |
| 751 | + | |
| 752 | + | |
| 753 | + | |
| 754 | + | |
| 755 | + | |
| 756 | + | |
| 757 | + | |
| 758 | + | |
| 759 | + | |
| 760 | + | |
| 761 | + | |
| 762 | + | |
| 763 | + | |
| 764 | + | |
| 765 | + | |
| 766 | + | |
| 767 | + | |
| 768 | + | |
| 769 | + | |
| 770 | + | |
| 771 | + | |
| 772 | + | |
| 773 | + | |
| 774 | + | |
| 775 | + | |
| 776 | + | |
| 777 | + | |
| 778 | + | |
| 779 | + | |
| 780 | + | |
739 | 781 | | |
740 | 782 | | |
741 | 783 | | |
| |||
0 commit comments