Skip to content

Commit 72c47d3

Browse files
committed
minor symfony#14457 [secrets] Use APP_RUNTIME_ENV to define secrets (jderusse)
This PR was merged into the 5.2 branch. Discussion ---------- [secrets] Use APP_RUNTIME_ENV to define secrets Use new env variable introduced in symfony/symfony#38543 to define secrets. /cc `@nicolas`-grekas Commits ------- 9994e7b Use APP_RUNTIME_ENV to define secrets
2 parents 4e7f2cb + 9994e7b commit 72c47d3

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

configuration/secrets.rst

+3-3
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ running:
4848

4949
.. code-block:: terminal
5050
51-
$ php bin/console secrets:generate-keys --env=prod
51+
$ APP_RUNTIME_ENV=prod php bin/console secrets:generate-keys
5252
5353
This will generate ``config/secrets/prod/prod.encrypt.public.php`` and
5454
``config/secrets/prod/prod.decrypt.private.php``.
@@ -78,7 +78,7 @@ Suppose you want to store your database password as a secret. By using the
7878
$ php bin/console secrets:set DATABASE_PASSWORD
7979
8080
# set your production value
81-
$ php bin/console secrets:set DATABASE_PASSWORD --env=prod
81+
$ APP_RUNTIME_ENV=prod php bin/console secrets:set DATABASE_PASSWORD
8282
8383
This will create a new file for the secret in ``config/secrets/dev`` and another
8484
in ``config/secrets/prod``. You can also set the secret in a few other ways:
@@ -253,7 +253,7 @@ your secrets during deployment to the "local" vault:
253253

254254
.. code-block:: terminal
255255
256-
$ php bin/console secrets:decrypt-to-local --force --env=prod
256+
$ APP_RUNTIME_ENV=prod php bin/console secrets:decrypt-to-local --force
257257
258258
This will write all the decrypted secrets into the ``.env.prod.local`` file.
259259
After doing this, the decryption key does *not* need to remain on the server(s).

0 commit comments

Comments
 (0)