Environment Configuration
Configuration is layered and environment-specific:
config/environment/.env.mainβ base configuration shared across environmentsconfig/environment/.env.type.local,.dev,.prod, etc. β environment overridesconfig/environment/.env.type.local.override,*.dev.override, etc. β optional overrides for local, dev, etc. (not committed to Git)config/environment/.env.secretβ sensitive credentials (auto-generated during install, not committed to Git)
Run make env to build the two generated files below (make install runs it for you):
.env.runtimeβ the non-secret files above merged in order (main β type β override). Every service reads it at runtime..envβ.env.runtimeplus.env.secret. Docker Compose reads it for its own settings.
If a script tells you to “Run make env first”, .env.runtime is missing. Both files are generated
and excluded from Git via .gitignore.
β οΈ Tip: Do not edit
.envor.env.runtime.make envandmake installoverwrite them. Edit the.env.type.*files, or create an override file for local development.
Secret Management
Secrets are generated automatically during installation using a template file:
- Template path:
sh/env/.env.secret.template - The template uses two placeholders:
generate_this_passfor passwords (e.g.MYSQL_ROOT_PASSWORD=generate_this_pass) andgenerate_keyfor WordPress authentication keys/salts (e.g.WP_AUTH_KEY='generate_key'). The generator script also supports a third placeholder,generate_safe_token, which the shipped template does not currently use. - During installation,
secret-gen.shreplaces these placeholders with randomly generated secure values - The resulting
.env.secretfile is excluded from Git via.gitignore
You do not need to manually create .env.secret. It is always generated based on the template.
SSL certificates located in config/ssl/live/<your-domain>/ are also managed as secrets. They should not be committed to version control.
π Important: Do not commit
.env.secret, SSL files and other sensitive data to version control. They are meant to be environment-specific and should be kept secure.