product:containers
Show Docker container status for the active product and all its features.
Usage
splent product:containers [--dev] [--prod]
Example output
my_first_app [dev]
SOURCE SERVICE STATUS PORTS
──────────────────────────────────────────────────────────────────────────────────────────
splent_feature_redis@v1.5.6 splent_feature_redis running 6971→6379
splent_feature_nginx@v1.0.0 splent_feature_nginx running 671→80
splent_feature_phpmyadmin@v1.0.0 splent_feature_phpmyadmin running 8672→80
splent_feature_mailhog@v1.0.7 splent_feature_mailhog running 1616→1025, 8616→8025
my_first_app my_first_app_db running 33651→3306
my_first_app my_first_app_web running 5591→5000
Accessible services:
──────────────────────────────────────────────────────────────────────────────────────────
Nginx http://localhost:671
phpMyAdmin http://localhost:8672
Mailhog http://localhost:8616
App http://localhost:5591
Connection endpoints:
──────────────────────────────────────────────────────────────────────────────────────────
Redis localhost:6971
Mailhog SMTP localhost:1616
MariaDB localhost:33651
Port offset: +591
crc32("my_first_app") % 1000 = 591
SERVICE BASE OFFSET HOST CONTAINER
─────────────────────────────────────────────────────────────
splent_feature_redis 6380 +591 6971 → 6379
splent_feature_nginx 80 — 80 → 80
splent_feature_phpmyadmin 8081 +591 8672 → 80
splent_feature_mailhog 1025 +591 1616 → 1025
splent_feature_mailhog 8025 +591 8616 → 8025
my_first_app_db 33060 +591 33651 → 3306
my_first_app_web 5000 — 5591 → 5000
Options
| Option | Description |
|---|---|
--dev |
Use the development Docker Compose file. |
--prod |
Use the production Docker Compose file. |
If neither flag is provided, the command reads SPLENT_ENV directly from the running web container (docker exec {product}_web printenv SPLENT_ENV). This means it always reflects the actual running environment. If you deployed prod, it shows prod containers; if you derived dev, it shows dev containers. No manual flag needed.
Description
Container discovery depends on the environment.
Dev mode. Each feature runs as its own Docker Compose project. The command queries each feature’s compose file individually, then the product’s own compose file.
Prod mode. Everything runs under a single merged docker-compose.deploy.yml (generated by product:build). The command queries that single compose project and labels containers by their service name.
Each container is shown with the following details.
| Column | Description |
|---|---|
| SOURCE | Which feature or the product name. Tells you where the container comes from |
| SERVICE | Docker Compose service name |
| STATUS | Container state, colour-coded |
| PORTS | Host→container port mappings |
Status colours
- Green. Running / healthy
- Yellow. Starting / restarting
- Red. Exited / stopped / unhealthy
Accessible services
HTTP services that can be opened in a browser (Flask on 5000, Mailhog UI on 8025, Nginx on 80, phpMyAdmin on 80, etc.) are listed with their http://localhost:PORT URLs.
Connection endpoints
Non-HTTP services (Redis, MariaDB, SMTP) are shown separately with their localhost:PORT connection strings, useful for configuring database clients, Redis CLI, or mail tools.
Port offset table
At the bottom, a summary table shows how the port offset was applied to each service.
| Column | Description |
|---|---|
| SERVICE | Docker Compose service name |
| BASE | The original port declared in the feature’s .env.example |
| OFFSET | The product-specific offset (+591 in this example), or — if not adjusted |
| HOST | The resulting port on the host (BASE + OFFSET) |
| CONTAINER | The internal container port |
The offset formula (crc32(product_name) % 1000) is shown so the developer understands why these specific port numbers were assigned. See Port offset for full details.
See also
- product:up. Start containers
- product:down. Stop containers
- product:logs. Tail container logs
- product:port. Show product URL and port