monoceros add-port
Exposes one or more container ports through the Monoceros proxy, so you can
reach them from the host by hostname (e.g. acme.localhost). Routing is live
after the next monoceros apply.
monoceros add-port <name> <port> [<port> ...] [--yes] [--default]Pass the port numbers as arguments. --default makes the first port the default
hostname for the workbench.
Examples
Section titled “Examples”# A single portmonoceros add-port acme 3000
# Several at oncemonoceros add-port acme 3000 8080
# Make a single port the default host (acme.localhost)monoceros add-port acme 3000 --defaultBehavior
Section titled “Behavior”- Idempotent. Re-adding a port that is already exposed is a no-op.
- No confirmation prompt. The edit is written straight to the yml as soon as you run the command.
- Live immediately. The proxy hot-reloads, so the route works at once - no
rebuild, no
apply. The port is also saved to the yml, so a laterapplyon any machine restores it.
See also
Section titled “See also”- Proxy and tunnels - how the proxy and hostnames work.
monoceros remove-port- the inverse.