product:port
Show the real URL and port where the active product is running.
Usage
Inspect default environment (resolved automatically).
splent product:port
Inspect a specific environment.
splent product:port --env dev
splent product:port --env prod
Development environment
In development, SPLENT prints the URL of the running product based on the published Docker port.
If running inside the official Vagrant VM, SPLENT uses this host.
10.10.10.10
Otherwise it uses this host.
localhost
Production environment
In production mode, the command behaves the same. It selects the compose file for prod and prints the actual published port.
Description
This command does the following.
- Loads
/workspace/.envto determine the active product (SPLENT_APP). - Loads the product env file,
<product>/docker/.env. - Resolves the environment in this order.
--envSPLENT_ENVin the product.env- otherwise
dev
- Chooses the compose file from these candidates.
docker-compose.<env>.ymldocker-compose.yml(fallback)
- Finds the product web service (service name containing the product name).
- Reads the published runtime ports from Docker.
- Prints the final URL.
Requirements
/workspace/.envmust exist and includeSPLENT_APP.<product>/docker/.envmust exist.- The product must be running (a container must exist with published ports).