Skip to content

Commit b9f404b

Browse files
committed
minor #20785 [Deployment] - More accurate local .env file recommendation (jdevinemt)
This PR was submitted for the 7.2 branch but it was squashed and merged into the 6.4 branch instead. Discussion ---------- [Deployment] - More accurate local .env file recommendation Updated file recommended for use when using .env files to manage environment variables for the application. Previously, the recommended file was `.env.local`, but if values added here would be overridden by `.env.prod` if present. It might be uncommon that someone would use a combination of `.env` and `.env.prod`, but it can't be assumed that it isn't the case. Using `.env.prod.local` is always going to be the last file processed by the dotenv component by default. It might be even better to not reference "prod" directly in `.env.prod.local` and instead say `.env.<env>.local`, but prod is explicitly referenced elsewhere in this section/page. So I left the explicit reference. Commits ------- cb18658 [Deployment] - More accurate local .env file recommendation
2 parents 8c3c7ee + cb18658 commit b9f404b

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

Diff for: deployment.rst

+2-3
Original file line numberDiff line numberDiff line change
@@ -134,14 +134,13 @@ B) Configure your Environment Variables
134134
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
135135

136136
Most Symfony applications read their configuration from environment variables.
137-
While developing locally, you'll usually store these in ``.env`` and ``.env.local``
138-
(for local overrides). On production, you have two options:
137+
While developing locally, you'll usually store these in :ref:`.env files <configuration-env-var-in-dev>`. On production, you have two options:
139138

140139
1. Create "real" environment variables. How you set environment variables, depends
141140
on your setup: they can be set at the command line, in your Nginx configuration,
142141
or via other methods provided by your hosting service;
143142

144-
2. Or, create a ``.env.local`` file like your local development.
143+
2. Or, create a ``.env.prod.local`` file containing values specific to your production environment.
145144

146145
There is no significant advantage to either of the two options: use whatever is
147146
most natural in your hosting environment.

0 commit comments

Comments
 (0)