Skip to content

Mention COMPOSE_FILE and COMPOSE_PROJECT_NAME #14264

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 9, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions setup/symfony_server.rst
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,25 @@ When Docker services are running, browse a page of your Symfony application and
check the "Symfony Server" section in the web debug toolbar; you'll see that
"Docker Compose" is "Up".

If your Docker Compose file is not at the root of the project, you can pass that information
to the Symfony Server. It works exactly the same as for ``docker-compose``.

Let's say you have your ``docker-compose.yaml`` file under a ``docker/`` directory.
You start your containers like this:

.. code-block:: bash

COMPOSE_FILE=docker/docker-compose.yaml COMPOSE_PROJECT_NAME=project_name docker-compose up -d

And if you are using the same environment variables with the Symfony CLI, things will work. For instance:

.. code-block:: bash

COMPOSE_FILE=docker/docker-compose.yaml COMPOSE_PROJECT_NAME=project_name symfony var:export

If you have more than one docker-compose files you can provide them all separated by ``:``
more information here: https://docs.docker.com/compose/reference/envvars/

SymfonyCloud Integration
------------------------

Expand Down