- Issue created by @daffie
- 🇳🇱Netherlands daffie
My workflow:
cd drupalci_environments/db/mongodb-7 docker build --no-cache . # get the docker image docker image ls docker run -it df1bfbf41a98 bash # on the cli in the container run ./docker-entrypoint-initdb.d/startup.sh
The last command will:
- create the mongoDB instances;
- create the replica set;
- create the database user for Drupal.Hopefully this will make it easier for one of the maintainers to fix the problem.
I have tried to create a MR, but I was not allowed to do so.
- Status changed to Needs review
about 1 month ago 5:29pm 31 July 2024 - First commit to issue fork.
- 🇫🇷France andypost
+1 to change
CMD
toENTRYPOINT
, sorry, I will check it later - 🇫🇷France andypost
Btw, needs to check if gitlab-runner does no undet for entrypoint or cmd
- 🇳🇱Netherlands bbrala Netherlands
Few things to try.
It seems it does at least try to connect? Locally i did have somme issues to connect normally with phpstorm, wonder if perhaps the auth database is wrong by default. Id i add the db used to db also it works a little easier, might be a thing.
use db; db.createUser({ user: rootUser, pwd: rootPassword, roles: [ {role: "dbOwner", db: "admin"}, {role: "dbOwner", db: "db"}, ] });
I'd (for testing purposed) output logging. Which would need 2 changes (stdout is hard with mutiple forks).
mongod --dbpath /data/db1 --port 27017 --fork --logpath /var/log/mongodb/db1.log --replSet dbrs --keyFile /replica.key --bind_ip_all --transitionToAuth mongod --dbpath /data/db2 --port 27018 --fork --logpath /var/log/mongodb/db2.log --replSet dbrs --keyFile /replica.key --bind_ip_all --transitionToAuth mongod --dbpath /data/db3 --port 27019 --fork --logpath /var/log/mongodb/db3.log --replSet dbrs --keyFile /replica.key --bind_ip_all --transitionToAuth
And then:
tail -f /var/log/mongodb/db*.log
ANyways, kinda hard to help and debug, my mongodb knowledge is kinda minimal. It does start and connect perfectly fine locally at least :x
- Merge request !45Commit patch but also log more and add db user to db db also → (Merged) created by bbrala
- 🇳🇱Netherlands bbrala Netherlands
Seems tests are actually ran!
See: https://git.drupalcode.org/project/drupal/-/merge_requests/7326/pipelines
Currently using a different build see: https://git.drupalcode.org/project/drupal/-/merge_requests/7326/diffs?co...
But seems the new changes are all good :)
- 🇳🇱Netherlands bbrala Netherlands
Updates the image last time, we do need the extra user