summaryrefslogtreecommitdiffhomepage
path: root/public/v2/apps/nightscout.json
blob: bf30a275b2096f9f7a93c7107320a9fddc40a4ae (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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
{
    "captainVersion": "2",
    "documentation": "Built from scratch (https://github.com/nightscout/cgm-remote-monitor)",
    "displayName": "",
    "description": "Nightscout is a free and open-source project, and associated social movement, that enables accessing and working with continuous glucose monitor data",
    "dockerCompose": {
        "version": "3.3",
        "services": {
            "$$cap_appname-mongodb": {
                "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": "root",
                    "MONGO_INITDB_ROOT_PASSWORD": "$$cap_mongo_password"
                }
            },
            "$$cap_appname-nightscout": {
                "depends_on": [
                    "$$cap_appname-mongodb"
                ],
                "dockerfileLines": [
                    "FROM node:10",
                    "RUN mkdir -p /opt/app",
                    "WORKDIR /opt/app",
                    "RUN git clone git://github.com/nightscout/cgm-remote-monitor.git /opt/app",
                    "RUN cd /opt/app &&  git checkout $$cap_nighscout_version && rm -rf .git",
                    "RUN cd /opt/app && npm install && npm run postinstall && npm run env",
                    "EXPOSE 1337",
                    "CMD [\"node\", \"server.js\"]"
                ],
                "containerHttpPort": "1337",
                "restart": "always",
                "environment": {
                    "PORT": "1337",
                    "INSECURE_USE_HTTP": "true",
                    "MONGO_CONNECTION": "mongodb://root:$$cap_mongo_password@srv-captain--$$cap_appname-mongodb:27017/nightscout?authSource=admin",
                    "API_SECRET": "$$cap_api_secret",
                    "BASE_URL": "https://replace.me.in.settings.of.website.com",
                    "DISPLAY_UNITS": "mg/dl"
                }
            }
        }
    },
    "instructions": {
        "start": "Nightscout acts as a web-based CGM (Continuous Glucose Monitor) to allow multiple caregivers to remotely view a patient's glucose data in real time.",
        "end": "Nightscout is deployed and available as $$cap_appname-nightscout."
    },
    "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_password",
            "label": "MongoDB password",
            "description": "Only use alphanumeric chars.",
            "validRegex": "/^([a-zA-Z0-9])+$/"
        },
        {
            "id": "$$cap_nighscout_version",
            "label": "Nighscout Version",
            "defaultValue": "0.11.1",
            "description": "Check out their page for the valid tags https://github.com/nightscout/cgm-remote-monitor/releases",
            "validRegex": "/^([^\\s^\\/])+$/"
        },
        {
            "id": "$$cap_api_secret",
            "label": "API key",
            "description": "Use a random string (alphanumberic) - minimum 12 characters. See documentation for more details.",
            "validRegex": "/^([a-zA-Z0-9]){12,}$/"
        }
    ]

}