summaryrefslogtreecommitdiffhomepage
path: root/public/v2/apps/mongodb.json
blob: 570b5a19ca708f33156aa9aa3a2bf11b7a9c841b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
{
    "captainVersion": "2",
    "documentation": "Taken from https://hub.docker.com/r/mongo/",
    "displayName": "MongoDB",
    "description": "MongoDB is a cross-platform document-oriented database program. Classified as a NoSQL database program",
    "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?authSource=admin', {userMongoClient: true});"
    },
    "variables": [
        {
            "id": "$$cap_mongo_version",
            "label": "MongoDB Version",
            "defaultValue": "4",
            "description": "Check out 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.*$/"
        }
    ]
}