summaryrefslogtreecommitdiffhomepage
path: root/public/v4/apps/mongodb.yml
blob: 21edbaa66c9f8433347c58b659fa52b1a0ebe88c (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
captainVersion: 4
services:
    $$cap_appname:
        image: mongo:$$cap_mongo_version
        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
        caproverExtra:
            notExposeAsWebApp: 'true'
caproverOneClickApp:
    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.*$/
    instructions:
        start: >-
            MongoDB is a cross-platform document-oriented database. Classified as a NoSQL database program, MongoDB uses JSON-like documents with schemas. 

            After installation on CapRover, it will be available as srv-captain--YOUR_CONTAINER_NAME at port 27017 to other CapRover apps.

            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});"
    displayName: MongoDB
    isOfficial: true
    description: MongoDB is a cross-platform document-oriented database program. Classified as a NoSQL database program
    documentation: Taken from https://hub.docker.com/r/mongo/