product:env
Generate or merge .env files for the active product (and optionally its features).
Table of contents
Development environment
Used during local development.
Generate .env for the product
splent product:env --generate --dev
Creates:
<product>/docker/.env
From:
.env.dev.example(preferred).env.example
Generate .env for product and all features
splent product:env --generate --all --dev
This:
- Generates the product
.env - Generates
.envfor every declared feature
Internally calls:
splent feature:env <feature> --generate --dev
Merge feature variables into product .env
splent product:env --merge --dev
This command:
- Loads the product
.env - Reads
.envfiles from all features - Adds missing variables to the product
.env
Product variables are never overridden.
Production environment
Used for deployment environments.
Generate .env for the product
splent product:env --generate --prod
Creates:
<product>/docker/.env
From:
.env.prod.example(preferred).env.example
Generate .env for product and features
splent product:env --generate --all --prod
Generates .env for:
- the product
- every declared feature
Merge feature variables into the product .env
splent product:env --merge --prod
The merge process:
- Uses the product
.envas the base - Reads
.envfiles from features - Adds missing keys to the product
.env
Existing product variables remain unchanged.
Requirements
- A product must be selected:
splent product:select <product>
- The product must contain:
pyproject.toml
docker/