product:deploy

Deploy the product using docker-compose.deploy.yml and .env.deploy.


Usage

splent product:deploy [--ci] [--down]

Options

Option Description
--ci Non-interactive mode for CI/CD pipelines. Variables marked <SET> are read from system environment variables instead of prompting.
--down Stop the running deployment instead of starting it.

Description

This command deploys the active product using the deployment artifacts generated by product:build.

It:

  1. Requires docker-compose.deploy.yml and .env.deploy.example (generated by product:build).
  2. Creates .env.deploy from the template if it doesn’t exist.
  3. Syncs .env.deploy with the template — infrastructure variables are updated from the template, user-configured values (those that were <SET> and filled in) are preserved. This means you can re-run product:build + product:deploy without losing your passwords or domain settings.
  4. Prompts interactively for variables with <SET> values. In --ci mode, reads from system environment variables instead.
  5. Sets SPLENT_ENV=prod in the product’s .env so the workspace knows the active environment.
  6. Checks for port conflicts and offers to stop conflicting containers.
  7. Deploys with docker compose -f docker-compose.deploy.yml --env-file .env.deploy up -d --build.
  8. Health checks the app and shows the URL.

Environment sync strategy

When .env.deploy already exists from a previous deploy, the command syncs it with the latest template:

Variable in template Variable in existing .env.deploy Result
MARIADB_HOSTNAME=my_first_app_db MARIADB_HOSTNAME=my_first_app_db_deploy (stale) Updated from template
MARIADB_PASSWORD=<SET> MARIADB_PASSWORD=secret123 (user-configured) Preserved
SPLENT_ENV=prod (missing) Added
REDIS_HOST_PORT=6971 REDIS_HOST_PORT=6971 (same) No change

The rule: the template is the source of truth for everything except <SET> values the user already filled in.


Workflow

Typical deployment flow:

splent product:build
splent product:deploy

Requirements

  • A product must be selected (SPLENT_APP set).
  • You must run splent product:build before deploying.

CI/CD example

export DB_PASSWORD=secret
export SECRET_KEY=abc123
splent product:build
splent product:deploy --ci

In --ci mode, every <SET> placeholder in .env.deploy.example is resolved from the corresponding system environment variable. If a variable is missing, the command fails with an error.


Back to top

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