GithubHelp home page GithubHelp logo

ddev-mongo's Issues

Maintainers wanted!

@wtfred - you contributed the original work for this. Would you consider co-maintaining this project?

Anybody else around that regularly uses Mongo? I'm no expert, so having somebody else around who actually knows their way around will help. I can help with everything in the ddev/docker/docker-compose end of course.

How to use .ddev/docker-compose.mongo-extra.yaml to expose mongo port to host

There might be a better way, but I added this to docker-compose.mongo.yaml in order to make the instance accessible outside of DDev environments.

services:
    mongo:
       ...
      ports:
         - "127.0.0.1:27017:27017"

In addition, I had to adjust connection credentials to use separate auth-database 'admin' and auth-protocol to SCRAM-SHA1.
image

The README states the default database is 'api', but I didn't see a database with this name, so I used 'local'.

Otherwise, very easy to setup.
Thanks.

Mongo Express returns `404 page not found`

Hello everyone :)

First of all, congratulations on a great job :)
Unfortunately I have noticed that I have some problems with mongo express in the browser.
Every time I try to access I get the error 404 page not found.
I turn over to you my docker.compose:

#ddev-generated
# Remove the line above if you don't want this file to be overwritten when you run
# ddev get ddev/ddev-mongo
#
# This file comes from https://github.com/ddev/ddev-mongo
#
services:
  mongo:
    container_name: ddev-${DDEV_SITENAME}-mongo
    image: mongo:5-focal
    volumes:
      - type: "volume"
        source: mongo
        target: "/data/db"
        volume:
          nocopy: true
      - ".:/mnt/ddev_config"
    restart: "no"
    expose:
      - "27017"
    labels:
      com.ddev.site-name: ${DDEV_SITENAME}
      com.ddev.approot: $DDEV_APPROOT
    environment:
      - MONGO_INITDB_ROOT_USERNAME=
      - MONGO_INITDB_ROOT_PASSWORD=
      - MONGO_INITDB_DATABASE=db
    healthcheck:
      test: [ "CMD-SHELL", "mongo --eval 'db.runCommand(\"ping\").ok' localhost:27017/test --quiet" ]
      timeout: 60s

  mongo_test: # Nome del servizio per il database di test
    container_name: ddev-${DDEV_SITENAME}-mongo-test
    image: mongo:5-focal
    volumes:
      - type: "volume"
        source: mongo_test # Nome del volume per il database di test
        target: "/data/db"
        volume:
          nocopy: true
    restart: "no"
    expose:
      - "27018" # Porta diversa per il database di test
    labels:
      com.ddev.site-name: ${DDEV_SITENAME}
      com.ddev.approot: $DDEV_APPROOT
    environment:
      - MONGO_INITDB_ROOT_USERNAME= # Nome utente per il database di test
      - MONGO_INITDB_ROOT_PASSWORD= # Password per il database di test
      - MONGO_INITDB_DATABASE=db_test # Nome del database di test

  mongo-express:
    container_name: ddev-${DDEV_SITENAME}-mongo-express
    image: mongo-express:latest
    restart: "no"
    labels:
      com.ddev.site-name: ${DDEV_SITENAME}
      com.ddev.approot: ${DDEV_APPROOT}
      com.ddev.platform: ddev
    expose:
      - "8081"
    environment:
      VIRTUAL_HOST: $DDEV_HOSTNAME
      ME_CONFIG_BASICAUTH_USERNAME: ''
      ME_CONFIG_BASICAUTH_PASSWORD: ''
      ME_CONFIG_MONGODB_ENABLE_ADMIN: false
      ME_CONFIG_MONGODB_AUTH_USERNAME: ''
      ME_CONFIG_MONGODB_AUTH_PASSWORD: ''
      ME_CONFIG_MONGODB_AUTH_DATABASE: 'db'
      HTTP_EXPOSE: "9091:8081"
    depends_on:
      - mongo
    entrypoint: [ sh, -c, "sleep 5s && tini -- /docker-entrypoint.sh mongo-express" ]

volumes:
  mongo:
  mongo_test:

The only thing I added was a second database for testing and removed local authentication.
For any further information please ask me :)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.