@@ -361,24 +361,22 @@ When Docker services are running, browse a page of your Symfony application and
361
361
check the "Symfony Server" section in the web debug toolbar; you'll see that
362
362
"Docker Compose" is "Up".
363
363
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:
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 ``:
369
367
370
368
.. code-block :: bash
371
369
370
+ # start your containers:
372
371
COMPOSE_FILE=docker/docker-compose.yaml COMPOSE_PROJECT_NAME=project_name docker-compose up -d
373
372
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
-
373
+ # run any Symfony CLI command:
378
374
COMPOSE_FILE=docker/docker-compose.yaml COMPOSE_PROJECT_NAME=project_name symfony var:export
379
375
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/
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 `_.
382
380
383
381
SymfonyCloud Integration
384
382
------------------------
@@ -400,3 +398,4 @@ debug any issues.
400
398
.. _`Proxy settings in macOS` : https://support.apple.com/guide/mac-help/enter-proxy-server-settings-on-mac-mchlp2591/mac
401
399
.. _`Proxy settings in Ubuntu` : https://help.ubuntu.com/stable/ubuntu-help/net-proxy.html.en
402
400
.. _`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