Skip to content

gemane/docker-react-graphql-express-mongodb

Repository files navigation

docker-react-graphql-express-mongodb

The docker container clone code from the books "The Road to GraphQL" and "The Road to React" to start a multi-container application which is using the technologies: React, GraphQL, Apollo, Express, NodeJS and MongoDB.

The code is cloned from the following repositories into two separated containers

Additionally a container with a MongoDB database will be initiated.

Requirements

You should have docker and docker-compose installed on your machine.

Installation

  • Clone the project from the repo,
  • build your project using
$ docker-compose build
  • and/or run the following command directly inside the directory
$ docker-compose up -d

Your project will run in the browser as

Connect to database inside mongodb container

$ mongo "mongodb://root:root_password@127.0.0.1:27017/mydatabase?authSource=admin"

Deployment

Included is a deployment script deployment-react-graphql-express-mongodb so that the application can be started easily.

Be careful as this script

  • stops all relevant container
  • deletes all exited container
  • deletes unused images
  • deletes orphaned volumes
  • and deletes orphaned network nodes.

Finally it builds and starts up all docker images.

About

docker-compose installation using repositories from The Road to GraphQL (React Express MongoDB)

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published