Skip to content

Fix docker configurator with many mark in volumes section #533

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
Aug 1, 2019

Conversation

maxhelias
Copy link
Contributor

@maxhelias maxhelias commented Jul 8, 2019

When you delete a recipe from the volumes section when there are only recipes, the "volumes" keywords are deleted.

cc @dunglas

@maxhelias
Copy link
Contributor Author

friendly ping @nicolas-grekas 😃

@@ -234,8 +234,6 @@ public function testConfigureFileWithExistingMarks()
- db-data:/var/lib/postgresql/data:rw
# You may use a bind-mounted host directory instead, so that it is harder to accidentally remove the volume and lose all your data!
# - ./docker/db/data:/var/lib/postgresql/data:rw
ports:
- "5432:5432"
Copy link
Member

Choose a reason for hiding this comment

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

Why have you removed the ports in the tests?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We deleted them from the recipes but i can revert that

Copy link
Member

Choose a reason for hiding this comment

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

Removing them from the recipes is a mistake IMHO. What we should do is only expose the port but not attach it to a specific port locally. So, I would use:

ports:
    - 5432

That allows the port to be exposed and a random port to be used locally (which can be picked up by the Symfony CLI Web Server -- https://symfony.com/doc/current/setup/symfony_server.html#docker-integration). That way, you can also have several projects using the same deps and running independently at the same time.

Copy link
Member

Choose a reason for hiding this comment

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

Anyway we don’t have to sync these test files with the recipes.

Copy link
Member

Choose a reason for hiding this comment

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

Sure thing, just wanted to reiterate my point of view on ports and Docker :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You're doing well because I misunderstood initially. I'm going to edit the PR symfony/recipes#413

@fabpot
Copy link
Member

fabpot commented Aug 1, 2019

Thank you @maxhelias.

@fabpot fabpot merged commit aa5ed03 into symfony:master Aug 1, 2019
fabpot added a commit that referenced this pull request Aug 1, 2019
…axhelias)

This PR was merged into the 1.4-dev branch.

Discussion
----------

Fix docker configurator with many mark in volumes section

When you delete a recipe from the volumes section when there are only recipes, the "volumes" keywords are deleted.

cc @dunglas

Commits
-------

aa5ed03 Fix docker configurator with many mark in volumes section
@maxhelias maxhelias deleted the fix-config-docker branch August 1, 2019 08:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants