{ "captainVersion": "1", "documentation": "Taken from https://hub.docker.com/r/mongo/", "dockerCompose": { "version": "3.3", "services": { "$$cap_appname": { "image": "mongo:$$cap_mongo_version", "notExposeAsWebApp": "true", "volumes": [ "$$cap_appname-db-data:/data/db", "$$cap_appname-db-config:/data/configdb" ], "restart": "always", "environment": { "MONGO_INITDB_ROOT_USERNAME": "$$cap_mongo_username", "MONGO_INITDB_ROOT_PASSWORD": "$$cap_mongo_password" } } } }, "instructions": { "start": "MongoDB is a cross-platform document-oriented database. Classified as a NoSQL database program, MongoDB uses JSON-like documents with schemas. \n\n After installation on CapRover, it will be available as srv-captain--YOUR_CONTAINER_NAME at port 27017 to other CapRover apps.\n\n Enter your MongoDB Configuration parameters and click on next. It will take about a minute for the process to finish.", "end": "MongoDB is deployed and available as srv-captain--$$cap_appname:27017 to other apps. For example with NodeJS: mongoose.connect('mongodb://srv-captain--$$cap_appname/mydatabase', {userMongoClient: true});" }, "variables": [{ "id": "$$cap_mongo_version", "label": "MongoDB Version", "defaultValue": "4", "description": "Checkout their Docker page for the valid tags https://hub.docker.com/r/library/mongo/tags/", "validRegex": "/^([^\\s^\\/])+$/" }, { "id": "$$cap_mongo_username", "label": "MongoDB RootUsername", "defaultValue": "root", "description": "Only use alphanumeric chars.", "validRegex": "/^([a-zA-Z0-9])+$/" }, { "id": "$$cap_mongo_password", "label": "MongoDB password", "validRegex": "/^\\s*\\S.*$/" } ] }