Skip to content

Commit 1eff202

Browse files
committed
bug #11305 Fixes typo with reassigning env vars. (dbrumann, javiereguiluz)
This PR was merged into the 4.2 branch. Discussion ---------- Fixes typo with reassigning env vars. Fixes #11304 #EUFOSSA Commits ------- ef05597 Made the explanation more concise a4823c4 Rephrase paragraph for clarification. 5aabd74 Fixes typo with reassigning env vars.
2 parents 2bf8ad3 + ef05597 commit 1eff202

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

setup/symfony_server.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -283,16 +283,16 @@ autoconfigured):
283283
# RABBITMQ_DSN
284284
rabbitmq: ...
285285
286-
If you can't or don't want to update the service names, you must remap the env
287-
vars so Symfony can find them. For example, if you want to keep a service called
288-
``mysql`` instead of renaming it to ``database``, the env var will be called
289-
``MYSQL_URL`` instead of the ``DATABASE_URL`` env var used in the Symfony
290-
application, so you add the following to the ``.env.local`` file:
286+
If your ``docker-compose.yaml`` file doesn't use the environment variable names
287+
expected by Symfony (e.g. you use ``MYSQL_URL`` instead of ``DATABASE_URL``)
288+
then you need to rename all occurrences of those environment variables in your
289+
Symfony application. A simpler alternative is to use the ``.env.local`` file to
290+
reassign the environment variables:
291291

292292
.. code-block:: bash
293293
294294
# .env.local
295-
MYSQL_URL=${DATABASE_URL}
295+
DATABASE_URL=${MYSQL_URL}
296296
# ...
297297
298298
Now you can start the containers and all their services will be exposed. Browse

0 commit comments

Comments
 (0)