Health Care
Nightscout, is an open-source, community-driven platform that enables real-time access to diabetes data, allowing individuals with diabetes and their care teams to remotely monitor glucose levels and make more informed treatment decisions. Our guide provides a step-by-step instruction on how to deploy a personalized version of Nightscout on a website at no cost.
Downloading PuTTY gives the ability to install Docker.
If prompted with the question ‘Which services should be restarted?’, please press the ‘OK’ button to confirm.
Verify that the Docker installation was successful by running the command:
This should list “docker” as one of the groups.
This should display the message “Hello from Docker!” and confirm that the installation was successful.
Portainer is a web-based tool that allows you to easily manage your Docker containers.
For detailed instructions on installing and using Portainer, please refer to the documentation here.
sudo docker run -d -p 9000:9000 --name=portainer --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer-ce:latest
version: "3.4"
services:
nightscout:
image: nightscout/cgm-remote-monitor:14.2.6
environment:
TZ: Europe/Berlin
MONGO_CONNECTION: mongodb://mongo:27017/mycgmic
API_SECRET: YOUR_API_SECRET
BG_HIGH: 8
BG_LOW: 3.9
BG_TARGET_TOP: 7
BG_TARGET_BOTTOM: 3.9
AUTH_DEFAULT_ROLES: readable devicestatus-upload
ENABLE: "careportal boluscalc food bwp cage sage iage iob cob basal ar2 rawbg pushover bgi pump openaps cors"
SHOW_FORECAST: openaps
SHOW_PLUGINS: "careportal openaps pump iob sage cage"
CUSTOM_TITLE: "Nightscout"
DISPLAY_UNITS: mmol
ports:
- "1337:1337"
depends_on:
- mongo
labels:
- "traefik.enable=true"
# Change the below Host from `localhost` to be the web address where Nightscout is running.
# Also change the email address in the `traefik` service below.
- "traefik.http.routers.nightscout.rule=Host(`YOUR_PUBLIC_HOST_URL`)"
- "traefik.http.routers.nightscout.entrypoints=websecure"
- "traefik.http.routers.nightscout.tls.certresolver=le"
volumes:
- "/home/pi/docker/rpi-nightscout:/var/opt/ssl/:ro"
restart: always
mongo:
image: mongo:4.4.9
volumes:
- "./data:/data/db"
ports:
- "27017:27017"
- "27018:27018"
- "27019:27019"
- "28017:28017"
restart: always
traefik:
image: traefik:latest
container_name: "traefik2"
command:
- "--providers.docker=true"
- "--providers.docker.exposedbydefault=false"
- "--entrypoints.web.address=:80"
- "--entrypoints.web.http.redirections.entrypoint.to=websecure"
- "--entrypoints.websecure.address=:443"
- "--certificatesresolvers.le.acme.httpchallenge=true"
- "--certificatesresolvers.le.acme.httpchallenge.entrypoint=web"
- "--certificatesresolvers.le.acme.storage=/letsencrypt/acme.json"
# Change the below to match your email address
- "--certificatesresolvers.le.acme.email=YOUR_EMAIL"
ports:
- "443:443"
- "80:80"
volumes:
- "./letsencrypt:/letsencrypt"
- "/var/run/docker.sock:/var/run/docker.sock:ro"
restart: always
Important: API_SECRET must be a minimum of 12 characters in length.