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.

  1. Loads /workspace/.env to determine the active product (SPLENT_APP).
  2. Loads the product env file, <product>/docker/.env.
  3. Resolves the environment in this order.
    • --env
    • SPLENT_ENV in the product .env
    • otherwise dev
  4. Chooses the compose file from these candidates.
    • docker-compose.<env>.yml
    • docker-compose.yml (fallback)
  5. Finds the product web service (service name containing the product name).
  6. Reads the published runtime ports from Docker.
  7. Prints the final URL.

Requirements

  • /workspace/.env must exist and include SPLENT_APP.
  • <product>/docker/.env must exist.
  • The product must be running (a container must exist with published ports).

Back to top

splent. Distributed by an LGPL license v3. Contact us: drorganvidez@us.es