@solcreek/dew 0.7.51 → 0.7.53
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 +51 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -89,6 +89,11 @@ port = 8025
|
|
|
89
89
|
`dew up` then boots the project and its services in one VM; containers use
|
|
90
90
|
the VM network, so the dev server reaches them on `localhost`.
|
|
91
91
|
|
|
92
|
+
`--services-only` (alias `--no-dev`) boots just the services — handy when
|
|
93
|
+
the app itself runs on the host and only its backing services live in dew.
|
|
94
|
+
This is the docker-compose-shaped path: several arbitrary OCI images,
|
|
95
|
+
health-gated and port-forwarded, in one microVM with no container daemon.
|
|
96
|
+
|
|
92
97
|
To reach a service running on the **macOS host** (e.g. a websocket gateway
|
|
93
98
|
in the VM calling back to a host RPC), use the hostname `host.internal`
|
|
94
99
|
(alias `host.dew.internal`) — dew's equivalent of `host.docker.internal`.
|
|
@@ -96,6 +101,45 @@ It resolves to the VM's NAT gateway in both the guest and its containers,
|
|
|
96
101
|
so you never hardcode the `192.168.64.x` gateway IP. The host service must
|
|
97
102
|
bind `0.0.0.0` (not `127.0.0.1`) to be reachable from the VM.
|
|
98
103
|
|
|
104
|
+
If the host service is bound to **`127.0.0.1`** (the dev default) — or you
|
|
105
|
+
want to sidestep the macOS 26 VZ NAT regression — expose it explicitly and
|
|
106
|
+
reach it at `host.lo.internal` instead. dew tunnels the declared ports over
|
|
107
|
+
vsock straight to the host's loopback, no `0.0.0.0` bind and no NAT:
|
|
108
|
+
|
|
109
|
+
```bash
|
|
110
|
+
dew up --expose-host 50051
|
|
111
|
+
# in the VM: host.lo.internal:50051 → the host's 127.0.0.1:50051
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
```toml
|
|
115
|
+
# or, in dew.toml:
|
|
116
|
+
[host]
|
|
117
|
+
expose = [50051]
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
dew only ever dials its own loopback on a port you declared, so the VM can't
|
|
121
|
+
reach anything else on the host.
|
|
122
|
+
|
|
123
|
+
### Run any container
|
|
124
|
+
|
|
125
|
+
Run a single OCI image in a microVM — no Docker daemon, sub-second boot,
|
|
126
|
+
automatic `--net=host` and port forwarding:
|
|
127
|
+
|
|
128
|
+
```bash
|
|
129
|
+
dew run --image redis:7-alpine -p 6379:6379
|
|
130
|
+
dew run --image axllent/mailpit -p 8025:8025 -e MP_SMTP_AUTH_ACCEPT_ANY=1
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
Each `dew run` is ephemeral and isolated, so several run side by side
|
|
134
|
+
without contending for a shared disk. For a long-lived VM that persists
|
|
135
|
+
state, `--name` gives it its own disk so named instances coexist:
|
|
136
|
+
|
|
137
|
+
```bash
|
|
138
|
+
dew vm start --name ci --profile standard # a second VM alongside the default
|
|
139
|
+
dew exec --name ci -- ./run-tests.sh
|
|
140
|
+
dew vm stop --name ci
|
|
141
|
+
```
|
|
142
|
+
|
|
99
143
|
### Share instantly
|
|
100
144
|
|
|
101
145
|
Temporary public HTTPS URL for any local port. Zero config, zero account.
|
|
@@ -212,7 +256,10 @@ performance prefer a native `linux/arm64` image.
|
|
|
212
256
|
```
|
|
213
257
|
Dev:
|
|
214
258
|
dew up [dir] Start dev environment
|
|
215
|
-
dew up --with postgres,redis Dev with services
|
|
259
|
+
dew up --with postgres,redis Dev with built-in services
|
|
260
|
+
dew up --init Write a starter dew.toml
|
|
261
|
+
dew up --services-only Boot services without a dev server
|
|
262
|
+
dew up --expose-host PORT Reach a host 127.0.0.1 service in the VM
|
|
216
263
|
dew down Stop dev environment
|
|
217
264
|
|
|
218
265
|
Share:
|
|
@@ -232,7 +279,9 @@ Infrastructure:
|
|
|
232
279
|
|
|
233
280
|
Advanced:
|
|
234
281
|
dew run [--] <cmd> Execute in ephemeral VM
|
|
235
|
-
dew
|
|
282
|
+
dew run --image <ref> Run an OCI image in a microVM
|
|
283
|
+
dew exec [--name <vm>] <cmd> Execute in a running VM
|
|
284
|
+
dew vm start/stop [--name] Manage long-lived (named) VMs
|
|
236
285
|
dew assets ... Manage VM images
|
|
237
286
|
dew update Update to latest version
|
|
238
287
|
|