@solcreek/dew 0.7.53 → 0.7.55
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +36 -13
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -83,28 +83,51 @@ port = 6379
|
|
|
83
83
|
[[service]]
|
|
84
84
|
name = "mailpit"
|
|
85
85
|
image = "axllent/mailpit:latest"
|
|
86
|
-
port = 8025
|
|
86
|
+
port = 8025 # primary port (health-gated + forwarded)
|
|
87
|
+
ports = ["1025"] # extra host forwards: "PORT" or "HOST:CONTAINER"
|
|
87
88
|
```
|
|
88
89
|
|
|
89
90
|
`dew up` then boots the project and its services in one VM; containers use
|
|
90
|
-
the VM network, so the dev server reaches them on `localhost`.
|
|
91
|
+
the VM network, so the dev server reaches them on `localhost`. A service that
|
|
92
|
+
exposes more than one port (mailpit's SMTP `1025` alongside its web UI `8025`)
|
|
93
|
+
lists the extras in `ports` — each `"PORT"` (host = container) or
|
|
94
|
+
`"HOST:CONTAINER"` to remap the host side.
|
|
91
95
|
|
|
92
96
|
`--services-only` (alias `--no-dev`) boots just the services — handy when
|
|
93
97
|
the app itself runs on the host and only its backing services live in dew.
|
|
94
98
|
This is the docker-compose-shaped path: several arbitrary OCI images,
|
|
95
99
|
health-gated and port-forwarded, in one microVM with no container daemon.
|
|
96
100
|
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
101
|
+
### Reach the macOS host from the VM
|
|
102
|
+
|
|
103
|
+
A service in the VM often has to call back to a process on your Mac — a
|
|
104
|
+
websocket gateway hitting a host RPC, an app talking to a database you run
|
|
105
|
+
natively. dew gives you two host aliases so you never hardcode the
|
|
106
|
+
`192.168.64.x` gateway IP. Both resolve inside the guest **and** inside
|
|
107
|
+
`--net=host` containers, so a `dew.toml` service reaches the host the same
|
|
108
|
+
way the guest does.
|
|
109
|
+
|
|
110
|
+
| Alias | Reaches a host service bound to | Path | Use when |
|
|
111
|
+
|---|---|---|---|
|
|
112
|
+
| `host.internal` (alias `host.dew.internal`) | `0.0.0.0` (all interfaces) | VZ NAT gateway | the host service already listens on all interfaces |
|
|
113
|
+
| `host.lo.internal` | **`127.0.0.1`** (the dev default) | vsock → host loopback | the service is loopback-only, or you want to dodge the macOS 26 VZ NAT regression |
|
|
114
|
+
|
|
115
|
+
**`host.internal` — the NAT-gateway alias**, dew's equivalent of
|
|
116
|
+
`host.docker.internal`. The host service must bind `0.0.0.0`; a `127.0.0.1`
|
|
117
|
+
bind stays unreachable (same caveat as docker's alias):
|
|
118
|
+
|
|
119
|
+
```bash
|
|
120
|
+
# bind the host service to 0.0.0.0 (a 127.0.0.1 bind is unreachable):
|
|
121
|
+
python3 -m http.server 50051 --bind 0.0.0.0
|
|
122
|
+
# then from the VM (or a --net=host container): curl http://host.internal:50051
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
**`host.lo.internal` — a vsock tunnel straight to the host's loopback.**
|
|
126
|
+
This is the one for the common dev case where the host service is bound to
|
|
127
|
+
`127.0.0.1` (a Rails RPC, a local Postgres, etc.). Declare the ports to
|
|
128
|
+
expose; dew forwards each over vsock to the host's `127.0.0.1` — no
|
|
129
|
+
`0.0.0.0` rebind, and because it never touches the network stack it is
|
|
130
|
+
**immune to the macOS 26 VZ NAT regression**:
|
|
108
131
|
|
|
109
132
|
```bash
|
|
110
133
|
dew up --expose-host 50051
|