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 following entrypoint is executed.
<product>/entrypoints/entrypoint.<env>.sh
Where <env> is one of the following.
devprod
The command does the following.
- 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 the following command.
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 the following.
entrypoints/entrypoint.dev.sh
entrypoints/entrypoint.prod.sh
inside the product directory.