network
Set public access, service ports and connections of an app.
lly network [SLUG|ID] [show]
lly network [SLUG|ID] expose
lly network [SLUG|ID] hide
lly network [SLUG|ID] add-port <PORT[/udp]>
lly network [SLUG|ID] remove-port <PORT>
lly network connect <FROM> <TO> --port <PORT>
lly network disconnect <FROM> <TO> [--port <PORT>]See Networking for public access, service ports and connections.
show
App copperfox
Exposed yes
Hostname copperfox.lilylabs.app
Ports 3000/tcp
Direction From To Port
outbound copperfox cinderrock 8080Shows public access, address, service ports and connections of the app.
expose and hide
lly network copperfox expose
lly network cinderrock hideexpose makes the app public. hide makes it private: the address no longer resolves, and connections from other apps continue to work. Both take effect immediately.
add-port and remove-port
lly network cinderrock add-port 9090
lly network cinderrock add-port 5353/udp
lly network cinderrock remove-port 9090Ports use TCP unless /udp is given. Changes take effect with the next deploy. If connections use a port being removed, lly asks whether to remove them as well.
connect and disconnect
lly network connect copperfox cinderrock --port 8080
lly network disconnect copperfox cinderrockconnect allows the first app to call the second on a port. If the called app does not serve the port, lly adds it. disconnect removes the connection, for all ports unless --port is given. Both take effect immediately. An app cannot be connected to itself.
Options
| Option | Description |
|---|---|
--port <PORT> | connect: allowed port. disconnect: remove only this port. |
Exit codes
| Code | Cause |
|---|---|
2 | Connection to the same app, or remove-port declined |
4 | Port or connection not found |
JSON output
show: the raw network settings. expose and hide: {"app", "exposed", "hostname", "revision"}. Other subcommands: {"app", "exposed", "revision", "ports", "inbound", "outbound"}.
See also
- Connect two apps: the same task step by step