8000 Add warning on Docker integration · symfony/symfony-docs@ace5e3a · GitHub
[go: up one dir, main page]

Skip to content

Commit ace5e3a

Browse files
qdequippeOskarStark
authored andcommitted
Add warning on Docker integration
1 parent 5cd490d commit ace5e3a

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

setup/symfony_server.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -378,6 +378,16 @@ its location, same as for ``docker-compose``:
378378
If you have more than one Docker Compose file, you can provide them all
379379
separated by ``:`` as explained in the `Docker compose CLI env var reference`_.
380380

381+
.. caution::
382+
383+
When using Symfony binary with ``php bin/console`` (``symfony console ...``)
384+
the binay will **always** use environment variables detected via Docker and will
385+
ignore local environment variables.
386+
For example if you set up a different database name in your ``.env.test`` file
387+
(``DATABASE_URL=mysql://db_user:db_password@127.0.0.1:3306/test``) and if you run
388+
``symfony console doctrine:database:drop --force --env=test`` the command will drop the database
389+
defined in your Docker configuration and not the "test" one.
390+
381391
SymfonyCloud Integration
382392
------------------------
383393

0 commit comments

Comments
 (0)
0