droneship expose
Share an app running in a sandbox at a private link.
Only people signed in to Droneship in the same project can open the link. When the sandbox has stopped, opening the link starts it again (with –start).
droneship expose [OPTIONS] PORTArguments
Section titled “Arguments”| Argument | Description |
|---|---|
PORT |
The port your app listens on in the sandbox |
Options
Section titled “Options”| Option | Description | Default |
|---|---|---|
--sandbox, -s ID |
Which sandbox (see droneship list) |
|
--start CMD |
How to start the app again after the sandbox stops, run in the repo (for example “npm run dev”). Without it, the link stops working when the sandbox stops. |
Examples
Section titled “Examples”Find the sandbox id, then share the app listening on port 3000 in it:
droneship listdroneship expose 3000 --sandbox <sandbox-id>The CLI prints the private link and the command that turns it off:
Private link for port 3000: https://<link-id>.<apps domain> people signed in to this project can open it when the sandbox stops, this link stops working: add --start CMD so opening it starts the app again turn it off: droneship unexpose <link-id>Keep the link working after the sandbox stops. Opening it then starts a new sandbox from the same launch settings and saved workspace, and runs the command in the repo:
droneship expose 3000 --sandbox <sandbox-id> --start "npm run dev"Starting again needs a sandbox that cloned a repo and keeps a saved workspace. For an --ephemeral sandbox, or a directory copied in with --local, the link stops working when the sandbox stops, even with --start, and the CLI says so.
Exposing a port that already has a link returns the same link, and --start updates its start command.
App links are turned on per account. Where they are off, the service answers app links are not available on this account.
Generated from the CLI. Verified against droneship 1.19.0 plus forge#459.