Skip to content

Commit 149876b

Browse files
committed
Reword
1 parent 569fc12 commit 149876b

File tree

1 file changed

+9
-13
lines changed

1 file changed

+9
-13
lines changed

configuration.rst

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -589,25 +589,21 @@ different scenarios: staging, quality assurance, client review, etc.)
589589
Configuration Based on Environment Variables
590590
--------------------------------------------
591591

592-
Using `environment variables`_ (or "env vars" for short) is a common practice to
593-
configure options that depend on where the application is run (e.g. the database
594-
credentials are usually different in production versus your local machine). If
595-
the values are sensitive, you can even :doc:`encrypt them as secrets </configuration/secrets>`.
592+
Using `environment variables`_ (or "env vars" for short) is a common practice to:
593+
594+
* Configure options that depend on where the application is run (e.g. the database
595+
credentials are usually different in production versus your local machine);
596+
* Configure options that can change dynamically in a production environment (e.g.
597+
to update the value of an expired API key without having to redeploy the entire
598+
application).
599+
600+
In other cases, it's recommended to keep using :ref:`configuration parameters <configuration-parameters>`.
596601

597602
Use the special syntax ``%env(ENV_VAR_NAME)%`` to reference environment variables.
598603
The values of these options are resolved at runtime (only once per request, to
599604
not impact performance) so you can change the application behavior without having
600605
to clear the cache.
601606

602-
.. note::
603-
604-
Environment variables are designed to store information that can
605-
dynamically change in a production environment, such as an API
606-
key that may have an expiration date. This information could be updated
607-
without having to redeploy the application. Thus, not everything is a good
608-
candidate for env vars, and
609-
:ref:`parameters <configuration-parameters>` should be used in other cases.
610-
611607
This example shows how you could configure the application secret using an env var:
612608

613609
.. configuration-block::

0 commit comments

Comments
 (0)