Skip to content

Commit 9d43fa3

Browse files
committed
minor #14264 Mention COMPOSE_FILE and COMPOSE_PROJECT_NAME (Plopix)
This PR was submitted for the master branch but it was merged into the 4.4 branch instead. Discussion ---------- Mention COMPOSE_FILE and COMPOSE_PROJECT_NAME https://github.com/symfony/cli/issues/323 Commits ------- 9f2e934 Add a mention to COMPOSE_FILE and COMPOSE_PROJECT_NAME vars
2 parents 6d7dbaa + 9f2e934 commit 9d43fa3

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

setup/symfony_server.rst

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -361,6 +361,25 @@ When Docker services are running, browse a page of your Symfony application and
361361
check the "Symfony Server" section in the web debug toolbar; you'll see that
362362
"Docker Compose" is "Up".
363363

364+
If your Docker Compose file is not at the root of the project, you can pass that information
365+
to the Symfony Server. It works exactly the same as for ``docker-compose``.
366+
367+
Let's say you have your ``docker-compose.yaml`` file under a ``docker/`` directory.
368+
You start your containers like this:
369+
370+
.. code-block:: bash
371+
372+
COMPOSE_FILE=docker/docker-compose.yaml COMPOSE_PROJECT_NAME=project_name docker-compose up -d
373+
374+
And if you are using the same environment variables with the Symfony CLI, things will work. For instance:
375+
376+
.. code-block:: bash
377+
378+
COMPOSE_FILE=docker/docker-compose.yaml COMPOSE_PROJECT_NAME=project_name symfony var:export
379+
380+
If you have more than one docker-compose files you can provide them all separated by ``:``
381+
more information here: https://docs.docker.com/compose/reference/envvars/
382+
364383
SymfonyCloud Integration
365384
------------------------
366385

0 commit comments

Comments
 (0)