product:restart

Restart the active product’s Flask app without recreating containers.


Usage

splent product:restart [--dev|--prod] [--full]

Options

Option Description
--dev Restart development server (default)
--prod Restart production server
--full Re-run the full entrypoint (reinstall deps, migrations, etc.)

How it works

Default (no flags)

  1. Finds the product’s web container
  2. Resolves symlinks and detects feature changes (new, removed, mode switches). Installs any changed features via pip.
  3. Restarts feature Docker containers (nginx, redis, etc.) in UVL dependency order. Progress is shown per feature:
        ⏳ redis ✓
        ⏳ nginx ✓
    
  4. Kills running Flask/watchmedo/gunicorn processes
  5. Loads the current .env file into the process environment
  6. Re-runs the start script (05_0_start_app_dev.sh or 05_1_start_app_prod.sh)

Feature containers are restarted first so that services like Redis or Nginx pick up configuration changes before Flask starts. Updated .env variables are picked up automatically.

With --full

  1. Finds the product’s web container
  2. Restarts feature Docker containers in UVL dependency order (same as default)
  3. Kills running Flask/watchmedo/gunicorn processes
  4. Loads the current .env file into the process environment
  5. Re-runs the full entrypoint (entrypoint.dev.sh or entrypoint.prod.sh)

This reinstalls dependencies, applies pending migrations, and restarts Flask. Use when you need a full re-setup without tearing down containers.


When to use it

  • After editing feature code (if watchmedo didn’t pick up the change)
  • After changing .env variables (product:env --merge)
  • After feature:add / feature:attach if the hot reload didn’t work as expected

feature:add, feature:attach, feature:unlock, feature:remove, and feature:detach already trigger a hot reload automatically. You only need product:restart if something didn’t pick up correctly.

Do not use --full after db:rollback — the entrypoint re-runs db:upgrade which would re-apply the migrations you just rolled back.


See also


Back to top

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