Navigation Menu

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

WIP: Add Docker Compose for local dev #1671

Closed
wants to merge 4 commits into from
Closed

WIP: Add Docker Compose for local dev #1671

wants to merge 4 commits into from

Conversation

conortm
Copy link
Contributor

@conortm conortm commented Jul 8, 2017

This proposed change adds support for running the site locally simply by running docker-compose up, eliminating the need to install anything locally (except Docker).

Considering this a "work in progress", as I have only tested on a Mac. It should work everywhere, but I don't want to assume. Any assistance with verifying on Windows/Linux would be much appreciated!

Please let me know if there is interest in this as a feature, and if I can provide more details/context.

@wbnns wbnns self-assigned this Jul 8, 2017
@wbnns
Copy link
Contributor

wbnns commented Jul 8, 2017

@conortm This is awesome - nice work! I will test and let you know.

@wbnns
Copy link
Contributor

wbnns commented Jul 14, 2017

@conortm Hey, just following up. In Ubuntu 16.04 I get the following output when running docker-compose up -d:

ERROR: Version in "./docker-compose.yml" is unsupported. You might be seeing this error because you're using the wrong Compose file version. Either specify a version of "2" (or "2.0") and place your service definitions under the `services` key, or omit the `version` key and place your service definitions at the root of the file to use version 1.
For more on the Compose file format versions, see https://docs.docker.com/compose/compose-file/

When I changed it to version 2, I then encountered the following error:

ERROR: Couldn't connect to Docker daemon at http+docker://localunixsocket - is it running?

If it's at a non-standard location, specify the URL with the DOCKER_HOST environment variable.

I was then able to workaround it by running sudo docker-compose up.

@conortm
Copy link
Contributor Author

conortm commented Jul 15, 2017

@wbnns Thanks for testing this out!

As for the version change, upgrading docker would fix that. However, as we don't need any version 3 -specific functionality, I changed the docker-compose.yml file version from 3 to 2.

As for the second error, you def shouldn't need sudo. Did you try some of the solutions mentioned here: docker/compose#4181? Perhaps restarting the daemon, or setting DOCKER_HOST, or reinstalling docker? I'll try spinning up a VM to try this out myself and report back.

Thanks again!

@conortm
Copy link
Contributor Author

conortm commented Jul 20, 2017

Also, Docker Compose is kinda overkill, as we just have one service -- it really just provides the convenience of one command (docker-compose up) instead of two (docker build ... and docker run ...). I'd be open to dropping Compose altogether and just updating the README steps accordingly, but I'm curious what other folks' thoughts are. Thanks!

@wbnns
Copy link
Contributor

wbnns commented Sep 10, 2017

@conortm Heya! If you're still interested in adding support for Docker, let's go ahead and drop Docker Compose and use the build and run commands instead, since we just have one service.

@wbnns
Copy link
Contributor

wbnns commented Sep 16, 2017

@conortm I'm closing for now; just let me know if you want to finish it up and we can reopen.

@wbnns wbnns closed this Sep 16, 2017
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.

None yet

2 participants