8000 Fixes typo with reassigning env vars. by dbrumann · Pull Request #11305 · symfony/symfony-docs · GitHub
[go: up one dir, main page]

Skip to content

Fixes typo with reassigning env vars. #11305

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Apr 6, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Rephrase paragraph for clarification.
  • Loading branch information
Denis Brumann committed Apr 6, 2019
commit a4823c43495023937365d5054a040e68f546aa0e
14 changes: 9 additions & 5 deletions setup/symfony_server.rst
Original file line number Diff line number Diff line change
Expand Up @@ -283,11 +283,15 @@ autoconfigured):
# RABBITMQ_DSN
rabbitmq: ...

If you can't or don't want to update the service names, you must remap the env
vars so Symfony can find them. For example, if you want to keep a service called
``mysql`` instead of renaming it to ``database``, the env var will be called
``MYSQL_URL`` instead of the ``DATABASE_URL`` env var used in the Symfony
application, so you add the following to the ``.env.local`` file:
If you rename environment variables inside the
``docker-compose.yaml`` then you have to make sure Symfony is aware of this
change as well. For example if inside your ``docker-compose.yaml`` you define
``MYSQL_URL`` instead of ``DATABASE_URL``,
you have to make sure that in your Symfony project all occurences of this
environment variable are changed as well. A safer alternative to changing the
environment variable could be to reassign ``MYSQL_URL`` to ``DATABASE_URL``
inside your ``.env.local`` to ensure that the name Symfony expected is actually
set:

.. code-block:: bash

Expand Down
0