Vivek Kumar
Vivek Kumar

Reputation: 75

Connect mongodb container running in Gitpod to local GUI Compass

I'm trying to connect mongodb in my gitpod workspace to mongodb compass but failing miserably. I installed mongodb via docker-compose, and the shell is working perfectly inside gitpod terminal. I just want to have a visual GUI in my locally installed compass.

How should I do this.?

My Docker-Compose file is:


version: '3.8'

services:
  mongodb:
    image: mongo
    container_name: mongodb
    ports:
      - '27017:27017'
    volumes:
      - ./mongodb_data:/data/db
    environment:
      - MONGO_INITDB_ROOT_USERNAME=admin
      - MONGO_INITDB_ROOT_PASSWORD=password

volumes:
  mongodb_data:
    driver: local

Upvotes: 1

Views: 72

Answers (0)

Related Questions