File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -39,10 +39,10 @@ composer require stechstudio/keep
3939# Create template from existing secrets
4040./vendor/bin/keep template:add .env.template --stage=production
4141
42- # Use template with placeholders
43- ./vendor/bin/keep export --stage=production --template=. env.template --file=.env
42+ # Use template with placeholders to generate .env file
43+ ./vendor/bin/keep export --stage=production --template=env/production.env --file=.env
4444
45- # Runtime injection - execute with secrets, no files created
45+ # Runtime injection - execute with secrets, no .env file created
4646./vendor/bin/keep run --vault=ssm --stage=production -- npm start
4747```
4848
Original file line number Diff line number Diff line change @@ -39,6 +39,21 @@ php artisan queue:restart
3939
4040Once cached, Laravel completely ignores environment variables, reading everything from ` bootstrap/cache/config.php ` .
4141
42+ ## Symfony Applications
43+
44+ Symfony compiles environment variables into the container during cache warmup. After compilation, all commands use the cached container:
45+
46+ ``` bash
47+ # Inject secrets during container compilation (only injection needed!)
48+ keep run --vault=ssm --stage=production -- php bin/console cache:warmup --env=prod
49+
50+ # All subsequent commands use compiled container - no injection required
51+ php bin/console doctrine:migrations:migrate --no-interaction
52+ php bin/console messenger:consume async
53+ ```
54+
55+ Once compiled, Symfony reads configuration from ` var/cache/prod/ ` and never accesses environment variables.
56+
4257## Node.js Applications
4358
4459``` bash
You can’t perform that action at this time.
0 commit comments