product:run

Introduction

product:run runs your product’s entrypoint, entrypoints/entrypoint.<env>.sh, inside its web container. The entrypoint installs the features, applies the migrations and starts the server. product:derive runs it after product:up.

splent product:run --dev
  ...
  ok [05_0_start_app_dev]

  entrypoint finished
  waiting for the web server to answer...

In development, the command then waits up to 120 seconds for the server to answer on port 5000 in the container. Any HTTP status counts, a 500 included. Without --dev or --prod, it uses SPLENT_ENV, and dev when that is unset.


Running the production entrypoint

splent product:run --prod

This runs entrypoint.prod.sh in the stack product:up --prod started. A deployment started with product:deploy already runs that entrypoint as its command, so restart it with product:restart --prod instead.


When the server does not come up

  The web server did not answer within 120s. Last lines of /var/log/entrypoint.log:

The command prints the last 20 lines of that log, where Flask writes, and exits 1. product:logs would not show the cause.

When the entrypoint itself fails, a migration for instance, the command prints Entrypoint failed (exit N). and exits with that code, so product:derive stops too.


Reference

Options

Option Description
--dev Run entrypoint.dev.sh
--prod Run entrypoint.prod.sh in the product:up --prod stack

Errors

Message Meaning
Entrypoint not found: <path> The product has no entrypoint for that environment
No web container found for <product> (<env>) among its running containers. Start it with splent product:up
No containers found, running locally (<env>) Nothing runs, so the entrypoint runs on the CLI’s side
Failed to query running containers via 'docker compose ps'. Exits with Compose’s code

The web container is the one whose service is <product>_web (dev) or <product>_web_deploy (prod), or else the one that mounts /workspace, never the database.


Requirements

  • A selected product (SPLENT_APP) with entrypoints/entrypoint.dev.sh and entrypoints/entrypoint.prod.sh.
  • Docker running.

Back to top

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