Skip to content

Commit 9769f6d

Browse files
committed
minor #14381 Add warning on Docker integration (qdequippe)
This PR was submitted for the 5.1 branch but it was squashed and merged into the 4.4 branch instead. Discussion ---------- Add warning on Docker integration A small warning to avoid drop database/data of your dev environment :) Commits ------- ace5e3a Add warning on Docker integration
2 parents 5cd490d + ace5e3a commit 9769f6d

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)