From 1020f582bc7cda8219eea3688c88fdf60a905e98 Mon Sep 17 00:00:00 2001 From: Michael Parker Date: Tue, 27 Sep 2022 09:07:39 -0400 Subject: [PATCH 1/4] add mongodb 6 egg add a separate modgo 6 egg. This uses the new mongosh tool that replaces the mongo application. --- database/nosql/mongodb/egg-mongo-d-b6.json | 52 ++++++++++++++++++++++ generic/golang/egg-golang-generic.json | 2 +- 2 files changed, 53 insertions(+), 1 deletion(-) create mode 100644 database/nosql/mongodb/egg-mongo-d-b6.json diff --git a/database/nosql/mongodb/egg-mongo-d-b6.json b/database/nosql/mongodb/egg-mongo-d-b6.json new file mode 100644 index 00000000..2e8aff43 --- /dev/null +++ b/database/nosql/mongodb/egg-mongo-d-b6.json @@ -0,0 +1,52 @@ +{ + "_comment": "DO NOT EDIT: FILE GENERATED AUTOMATICALLY BY PTERODACTYL PANEL - PTERODACTYL.IO", + "meta": { + "version": "PTDL_v2", + "update_url": null + }, + "exported_at": "2022-09-27T08:58:45-04:00", + "name": "MongoDB 6", + "author": "parker@parkervcp.com", + "description": "MongoDB is a general purpose, document-based, distributed database built for modern application developers and for my butt era.", + "features": null, + "docker_images": { + "MongoDB_6": "ghcr.io\/parkervcp\/yolks:mongodb_6" + }, + "file_denylist": [], + "startup": "mongod --fork --dbpath \/home\/container\/mongodb\/ --port ${SERVER_PORT} --bind_ip 0.0.0.0 --logpath \/home\/container\/logs\/mongo.log -f \/home\/container\/mongod.conf; until nc -z -v -w5 127.0.0.1 ${SERVER_PORT}; do echo 'Waiting for mongodb connection...'; sleep 5; done; mongosh --username ${MONGO_USER} --password ${MONGO_USER_PASS} --host 127.0.0.1:${SERVER_PORT} && mongosh --eval \"db.getSiblingDB('admin').shutdownServer()\" 127.0.0.1:${SERVER_PORT}", + "config": { + "files": "{}", + "startup": "{\r\n \"done\": \"child process started successfully\"\r\n}", + "logs": "{}", + "stop": "exit" + }, + "scripts": { + "installation": { + "script": "#!\/bin\/bash \r\nif [ ! -d \/mnt\/server\/ ]; then\r\n mkdir \/mnt\/server\/\r\nfi\r\n\r\ncd \/mnt\/server\/\r\n\r\ncp \/etc\/mongod.conf.orig \/mnt\/server\/mongod.conf\r\n\r\nmkdir mongodb logs\r\n\r\nmongod --port 27017 --dbpath \/mnt\/server\/mongodb\/ --logpath \/mnt\/server\/logs\/mongo.log --fork\r\n\r\nmongosh --eval \"db.getSiblingDB('admin').createUser({user: '${MONGO_USER}', pwd: '${MONGO_USER_PASS}', roles: ['root']})\"\r\n\r\nmongosh --eval \"db.getSiblingDB('admin').shutdownServer()\"", + "container": "mongo:6-focal", + "entrypoint": "bash" + } + }, + "variables": [ + { + "name": "Mongo Admin Username", + "description": "The MongoDB Admin user", + "env_variable": "MONGO_USER", + "default_value": "admin", + "user_viewable": true, + "user_editable": true, + "rules": "required|string", + "field_type": "text" + }, + { + "name": "Mongo Admin Password", + "description": "", + "env_variable": "MONGO_USER_PASS", + "default_value": "NewPa55w0rd", + "user_viewable": true, + "user_editable": true, + "rules": "required|string", + "field_type": "text" + } + ] +} \ No newline at end of file diff --git a/generic/golang/egg-golang-generic.json b/generic/golang/egg-golang-generic.json index ea660805..b1412f5c 100644 --- a/generic/golang/egg-golang-generic.json +++ b/generic/golang/egg-golang-generic.json @@ -16,7 +16,7 @@ "startup": ".\/${EXECUTABLE}", "config": { "files": "{}", - "startup": "{\r\n \"done\": \"change this part\"\r\n}",, + "startup": "{\r\n \"done\": \"change this part\"\r\n}", "logs": "{}", "stop": "^C" }, From 8e89159760e3051aa50d42d4b655b23390c303e8 Mon Sep 17 00:00:00 2001 From: Michael Parker Date: Tue, 27 Sep 2022 09:24:26 -0400 Subject: [PATCH 2/4] add note about free monitoring --- database/nosql/mongodb/README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/database/nosql/mongodb/README.md b/database/nosql/mongodb/README.md index 0a6415ae..b72a3a7d 100644 --- a/database/nosql/mongodb/README.md +++ b/database/nosql/mongodb/README.md @@ -4,6 +4,10 @@ MongoDB is a general purpose, document-based, distributed database built for modern application developers and for the cloud era. +### MongoDB free monitoring. + +To disable the message about free monitoring you can run `db.disableFreeMonitoring()`. + ## Minimum RAM warning MongoDB requires approximately 1GB of RAM per 100.000 assets. If the system has to start swapping memory to disk, this will have a severely negative impact on performance, and should be avoided. From b3b5d6db51d9eb9600ae613bca8aebdc75db1747 Mon Sep 17 00:00:00 2001 From: "Michael (Parker) Parker" Date: Tue, 27 Sep 2022 10:16:19 -0400 Subject: [PATCH 3/4] Update egg-mongo-d-b.json --- database/nosql/mongodb/egg-mongo-d-b.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/database/nosql/mongodb/egg-mongo-d-b.json b/database/nosql/mongodb/egg-mongo-d-b.json index f324983d..113bfe4f 100644 --- a/database/nosql/mongodb/egg-mongo-d-b.json +++ b/database/nosql/mongodb/egg-mongo-d-b.json @@ -11,8 +11,7 @@ "features": null, "docker_images": { "MongoDB_4": "ghcr.io\/parkervcp\/yolks:mongodb_4", - "MongoDB_5": "ghcr.io\/parkervcp\/yolks:mongodb_5", - "MongoDB_6": "ghcr.io\/parkervcp\/yolks:mongodb_6" + "MongoDB_5": "ghcr.io\/parkervcp\/yolks:mongodb_5" }, "file_denylist": [], "startup": "mongod --fork --dbpath \/home\/container\/mongodb\/ --port ${SERVER_PORT} --bind_ip 0.0.0.0 --logpath \/home\/container\/logs\/mongo.log -f \/home\/container\/mongod.conf; until nc -z -v -w5 127.0.0.1 ${SERVER_PORT}; do echo 'Waiting for mongodb connection...'; sleep 5; done && mongo --username ${MONGO_USER} --password ${MONGO_USER_PASS} --host 127.0.0.1:${SERVER_PORT} && mongo --eval \"db.getSiblingDB('admin').shutdownServer()\" 127.0.0.1:${SERVER_PORT}", From 98d008b90917a38babaee2f8d2b8dc6f4619317f Mon Sep 17 00:00:00 2001 From: Quinten <67589015+QuintenQVD0@users.noreply.github.com> Date: Sat, 1 Oct 2022 11:36:17 +0200 Subject: [PATCH 4/4] remove default value of Mongo admin password --- database/nosql/mongodb/egg-mongo-d-b.json | 2 +- database/nosql/mongodb/egg-mongo-d-b6.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/database/nosql/mongodb/egg-mongo-d-b.json b/database/nosql/mongodb/egg-mongo-d-b.json index 113bfe4f..facefe3f 100644 --- a/database/nosql/mongodb/egg-mongo-d-b.json +++ b/database/nosql/mongodb/egg-mongo-d-b.json @@ -43,7 +43,7 @@ "name": "Mongo Admin Password", "description": "", "env_variable": "MONGO_USER_PASS", - "default_value": "aP@55word", + "default_value": "", "user_viewable": true, "user_editable": true, "rules": "required|string", diff --git a/database/nosql/mongodb/egg-mongo-d-b6.json b/database/nosql/mongodb/egg-mongo-d-b6.json index 2e8aff43..388adcc9 100644 --- a/database/nosql/mongodb/egg-mongo-d-b6.json +++ b/database/nosql/mongodb/egg-mongo-d-b6.json @@ -42,7 +42,7 @@ "name": "Mongo Admin Password", "description": "", "env_variable": "MONGO_USER_PASS", - "default_value": "NewPa55w0rd", + "default_value": "", "user_viewable": true, "user_editable": true, "rules": "required|string",