product:run
Execute the product entrypoint inside the main container.
Development environment
Run (dev)
splent product:run --dev
If no flag is provided, the default environment is dev.
Production environment
Run (prod)
splent product:run --prod
Description
This command executes the product entrypoint script inside the main Docker container of the active product.
The entrypoint executed is:
<product>/entrypoints/entrypoint.<env>.sh
Where <env> is either:
devprod
The command:
- Detects the Docker Compose project for the selected product.
- Locates the container belonging to that project.
- Identifies the container that mounts
/workspace(preferred). - Executes the entrypoint inside that container using:
docker exec
If no container is running, the entrypoint is executed locally.
Compose file resolution
Compose files are resolved in this order:
docker-compose.<env>.ymldocker-compose.yml
Requirements
- A product must be selected:
splent product:select <product>
- The product must provide:
entrypoints/entrypoint.dev.sh
entrypoints/entrypoint.prod.sh
inside the product directory.