@@ -125,16 +125,27 @@ B) Configure your Environment Variables
125125~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
126126
127127Most Symfony applications read their configuration from environment variables.
128- While developing locally, you'll usually store these in a ``.env `` file. But on
129- production, instead of creating this file, you should set * real * environment variables.
128+ While developing locally, you'll usually store these in a ``.env `` file. On production,
129+ you have two options:
130130
131- How you set environment variables, depends on your setup: they can be set at the
132- command line, in your Nginx configuration, or via other methods provided by your
133- hosting service.
131+ 1. Create "real" environment variables. How you set environment variables, depends
132+ on your setup: they can be set at the command line, in your Nginx configuration,
133+ or via other methods provided by your hosting service.
134134
135- At the very least you need to define the ``APP_ENV=prod `` environment variable
136- to run the application in ``prod `` mode, but depending on your application you
137- may need to define other env vars too.
135+ 2. Or, create a ``.env `` file just like your local development (see note below)
136+
137+ There is no significant advantage to either of the two options: use whatever is
138+ most natural in your hosting environment.
139+
140+ .. note ::
141+
142+ If you use the ``.env `` file on production, you may need to move your
143+ ``symfony/dotenv `` dependency from ``require-dev `` to ``require `` in ``composer.json ``:
144+
145+ .. code-block :: terminal
146+
147+ $ composer remove symfony/dotenv
148+ $ composer reuire symfony/dotenv
138149
139150 C) Install/Update your Vendors
140151~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
0 commit comments