ddev / ddev-mongo Goto Github PK
View Code? Open in Web Editor NEWMongoDB add-on for DDEV
License: Apache License 2.0
MongoDB add-on for DDEV
License: Apache License 2.0
Tests are occasionally timing out on nightly build, for example, https://github.com/drud/ddev-mongo/runs/6224007011?check_suite_focus=true where we see
# Failed to restart testmongo: container failed to become healthy: err=container 'mongo-express' exited, please use 'ddev logs -s mongo-express' to find out why it failed
It seems that sometimes the increased timeout from 6b51df4 still isn't enough
@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.
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.
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.
@julienloizelet would you mind taking a look and seeing if you can sort out why nightlies are failing from directory? I'm not sure why the run doesn't give us a bit more info. Seems to fail on ddev restart
, https://github.com/ddev/ddev-mongo/actions/runs/5853744817/job/15875363058
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 :)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.