How it works...
This configuration is good for local development. Once the docker-compose up command is run, the local directory is rebuilt, it establishes a connection to a MongoDB instance using the latest version and begins operating against it. This recipe uses godeps for dependency management so that the entire GOPATH environment variable doesn't need to be mounted by the Dockerfile file.
This can provide a good baseline when starting on apps that require connections to external services, all of the Chapter 5, All about Databases and Storage, can make use of this approach rather than creating a local instance of the database. For production, you likely won't want to run your datastorage behind a Docker container, but you'll also generally ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access