Skip to content
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

[opinions] Use docker-compose? #72

Open
sayanarijit opened this issue Oct 22, 2019 · 6 comments
Open

[opinions] Use docker-compose? #72

sayanarijit opened this issue Oct 22, 2019 · 6 comments
Assignees

Comments

@sayanarijit
Copy link

There are some lengthy docker commands in the Makefle e.g.
https://github.com/niteoweb/pyramid-realworld-example-app/blob/master/Makefile#L28
https://github.com/niteoweb/pyramid-realworld-example-app/blob/master/Makefile#L34
https://github.com/niteoweb/pyramid-realworld-example-app/blob/master/Makefile#L39

Docker compose let's us define the default properties of all the containers in a yaml file so that the management commands become clean and minimal.

Docker compose also comes with several other goodies such as workspace specific network, auto unique container names etc. to avoid conflicting with other docker containers on the dev's machine.

It's also easy to run and debug containers with docker compose as no container has to be put in the background and all can print outputs in a single session on the terminal.

So I think it will be beneficial to use docker compose instead of raw docker commands. Opinions?

@sayanarijit
Copy link
Author

Example: How docker compose is being used in warehouse:
https://github.com/pypa/warehouse/blob/master/docker-compose.yml

@zupo
Copy link
Member

zupo commented Oct 23, 2019

Is there something else I need to install? As long as the "API" of make commands don't change and I don't have to tell people to install yet another dependency, I don't mind.

If, however, there are extra roadblocks for people to set up the env, then the benefits must vastly outweigh the cons (which in this case, is longer onboarding).

@sayanarijit
Copy link
Author

There's no extra dependency in mac and windows i.e. machines running "docker machine".
Since docker is native to linux and doesn't need "docker machine" to be installed, installing docker-ce won't install docker-compose. So we have to instruct linux users to install docker-compose. Is that okay?

@sayanarijit
Copy link
Author

Other api and make targets should stay the same.

@sayanarijit
Copy link
Author

@zupo
Copy link
Member

zupo commented Oct 24, 2019

Not ideal, but I do see the benefits. Could you please prepare a PR so we can all see how it would look?

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

No branches or pull requests

2 participants