GithubHelp home page GithubHelp logo

ddev-mongo's Introduction

DDEV logo with light and dark mode variants

CircleCI project is maintained Gitpod Ready-to-Code Open in GitHub Codespaces

DDEV is an open-source tool for running local web development environments for PHP, Python and Node.js, ready in minutes. Its powerful, flexible per-project environment configurations can be extended, version controlled, and shared. DDEV allows development teams to adopt a consistent Docker workflow without the complexities of bespoke configuration.

Documentation

To check out live examples, docs, contributor live training, guides and more visit ddev.com and ddev.readthedocs.io

Questions

If you need help, our friendly community provides great support.

Wonderful Sponsors

DDEV is an Apache License 2.0 open-source project with its ongoing development made possible entirely by the support of these awesome backers. If you'd like to join them, please consider sponsoring DDEV development.

DDEV Sponsor logos with light and dark mode variants

Contributing

See โ€œHow can I contribute to DDEV?โ€ in the FAQ, and the Contributing page.

Overview of GitHub contributions

Get Started

  1. Check System Requirements: macOS (Intel and Apple Silicon), Windows 10/11, WSL2, Linux, Gitpod, and GitHub Codespaces.
  2. Install a Docker provider and DDEV.
  3. Try a CMS Quick Start Guide.

Additionally, https://ddev.com/get-started/ provides an up-to-date getting-started guide.

Highlighted Features

  • Quickly create local web development environments based on code repositories, with minimal configuration.
  • Import a database to any of your local environments.
  • Import upload files to match the project (e.g. Drupal sites/default/files or WordPress wp-content/uploads).
  • Customizable integration with hosting platforms like Platform.sh, Pantheon, Acquia and others.
  • Run commands within the Docker environment using ddev exec.
  • View logs from the web and database containers.
  • Use ddev ssh to explore the Linux environment inside the container.
  • List running projects with ddev list.
  • Snapshot databases with ddev snapshot.
  • Temporarily share your development website with others using ddev share.
  • Create custom commands as simple shell scripts.
  • Enjoy effortless, trusted HTTPS support.
  • Extend and customize environments as much (or as little!) as you need to.

Run ddev to see all the commands.

ddev-mongo's People

Contributors

julienloizelet avatar mattstein avatar rfay avatar stasadev avatar tyler36 avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

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 return `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.