Mongo/Docker Setup

Chris Sexton

2022-03-28


Mongo/Docker Setup

#work/C442 #public

  1. Set up docker for your operating system if it's not already set up: https://www.docker.com
  2. Download and put in a known directory:
  3. Open a terminal and change directory to your known directory
  4. With Docker Desktop running, run docker compose up
  5. From any mongo client (like DataGrip), connect to:
    • host: 127.0.0.1
    • port: 27017
    • user: root
    • pass: example
  6. You will likely want to flip to the 'Schemas' tab in the connection settings and select "All databases"
    • You should have a students database and collection automatically
  7. When finished, use docker compose down to destroy the instance

You can use ^c to end the process, or run docker compose up -d to run it in the background.