8000 Merge branch '5.1' into 5.x · symfony/symfony-docs@1dc65ff · GitHub
[go: up one dir, main page]

Skip to content

Commit 1dc65ff

Browse files
committed
Merge branch '5.1' into 5.x
* 5.1: Add a mention to COMPOSE_FILE and COMPOSE_PROJECT_NAME vars
2 parents 93352f2 + 50a7529 commit 1dc65ff

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

setup/symfony_server.rst

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -361,6 +361,23 @@ 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, use the
365+
``COMPOSE_FILE`` and ``COMPOSE_PROJECT_NAME`` environment variables to define
366+
its location, same as for ``docker-compose``:
367+
368+
.. code-block:: bash
369+
370+
# start your containers:
371+
COMPOSE_FILE=docker/docker-compose.yaml COMPOSE_PROJECT_NAME=project_name docker-compose up -d
372+
373+
# run any Symfony CLI command:
374+
COMPOSE_FILE=docker/docker-compose.yaml COMPOSE_PROJECT_NAME=project_name symfony var:export
375+
376+
.. note::
377+
378+
If you have more than one docker-compose files you can provide them all
379+
separated by ``:``, as explained in the `Docker compose CLI env var reference`_.
380+
364381
SymfonyCloud Integration
365382
------------------------
366383

@@ -381,3 +398,4 @@ debug any issues.
381398
.. _`Proxy settings in macOS`: https://support.apple.com/guide/mac-help/enter-proxy-server-settings-on-mac-mchlp2591/mac
382399
.. _`Proxy settings in Ubuntu`: https://help.ubuntu.com/stable/ubuntu-help/net-proxy.html.en
383400
.. _`is treated differently`: https://ec.haxx.se/usingcurl/usingcurl-proxies#http_proxy-in-lower-case-only
401+
.. _`Docker compose CLI env var reference`: https://docs.docker.com/compose/reference/envvars/

0 commit comments

Comments
 (0)
0