Skip to content

Commit a4823c4

Browse files
author
Denis Brumann
committed
Rephrase paragraph for clarification.
1 parent 5aabd74 commit a4823c4

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

setup/symfony_server.rst

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -283,11 +283,15 @@ 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 you rename environment variables inside the
287+
``docker-compose.yaml`` then you have to make sure Symfony is aware of this
288+
change as well. For example if inside your ``docker-compose.yaml`` you define
289+
``MYSQL_URL`` instead of ``DATABASE_URL``,
290+
you have to make sure that in your Symfony project all occurences of this
291+
environment variable are changed as well. A safer alternative to changing the
292+
environment variable could be to reassign ``MYSQL_URL`` to ``DATABASE_URL``
293+
inside your ``.env.local`` to ensure that the name Symfony expected is actually
294+
set:
291295

292296
.. code-block:: bash
293297

0 commit comments

Comments
 (0)