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

Mention COMPOSE_FILE and COMPOSE_PROJECT_NAME #14264

merged 1 commit into from
Oct 9, 2020

Conversation

Plopix
Copy link
Contributor

@Plopix Plopix commented Sep 21, 2020

@javiereguiluz
Copy link
Member

@fabpot could you please review these proposed changes? Thanks!

@@ -357,6 +357,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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

, you can pass

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@@ -357,6 +357,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 as docker-compose.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

exactly the same as for docker-compose

Copy link
Contributor Author

@Plopix Plopix Oct 8, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I put the double tick here too. Done

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 as docker-compose.

Let's say you have your `docker-compose.yaml` file under a `docker/` directory.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You need to use double ticks

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@Plopix
Copy link
Contributor Author

Plopix commented Oct 8, 2020

I made the changes @fabpot. Thanks

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.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You have used triple ticks here twice :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

...sorry


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

And if you are using the same env variables with the Symfony CLI, things will work. For instance:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

environment instead of env?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done


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 `:`
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should it be double ticks too here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did, I think I had to.

@javiereguiluz javiereguiluz added this to the 4.4 milestone Oct 9, 2020
@javiereguiluz javiereguiluz changed the base branch from master to 4.4 October 9, 2020 11:33
@javiereguiluz javiereguiluz merged commit 9d43fa3 into symfony:4.4 Oct 9, 2020
@javiereguiluz
Copy link
Member

Sébastien thanks for this contribution! (and thanks to reviewers too).

Please note that we reword some bits while merging to make the explanation a bit more concise. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants