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 all commits
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
12 changes: 6 additions & 6 deletions setup/symfony_server.rst
Original file line number Diff line number Diff line change
Expand Up @@ -283,16 +283,16 @@ 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 your ``docker-compose.yaml`` file doesn't use the environment variable names
expected by Symfony (e.g. you use ``MYSQL_URL`` instead of ``DATABASE_URL``)
then you need to rename all occurrences of those environment variables in your
Symfony application. A simpler alternative is to use the ``.env.local`` file to
reassign the environment variables:

.. code-block:: bash

# .env.local
MYSQL_URL=${DATABASE_URL}
DATABASE_URL=${MYSQL_URL}
# ...

Now you can start the containers and all their services will be exposed. Browse
Expand Down
0