Giter VIP home page Giter VIP logo

cgm-remote-monitor-docker's Introduction

cgm-remote-monitor-docker

About

This is yet another docker image for Nightscout. Unlike the other images this tries to:

  • use individual tags for each Nightscout release
  • use Docker Hub's auto build feature
  • provide minimalized images using multistage builds
  • provide a docker-compose.yml example file
  • keep it up to date

Prerequisites

You need to have a host running Docker and Docker Compose. It is recommended to use a reverse proxy supporting https:// and wss:// SSL offloading.

Apache HTTPD reverse proxy

One possiblity is to use Apache HTTPD as SSL offloading reverse proxy using certificates from Let's Encrypt.

You need to enable the mod_proxy and mod_proxy_wstunnel modules. Nightscout uses a Websocket connection which needs to be handled special using mod_rewrite:

<VirtualHost *:443>
  ServerName ns.example.com

  RewriteEngine On
  RewriteCond %{REQUEST_URI}  ^/socket.io            [NC]
  RewriteCond %{QUERY_STRING} transport=websocket    [NC]
  RewriteRule /(.*)           ws://127.0.0.1:1337/$1 [P,L]

  ProxyPass / http://127.0.0.1:1337/
  ProxyPassReverse / http://127.0.0.1:1337/

  SSLCertificateFile /etc/letsencrypt/live/ns.example.com/fullchain.pem
  SSLCertificateKeyFile /etc/letsencrypt/live/ns.example.com/privkey.pem
  Include /etc/letsencrypt/options-ssl-apache.conf

  SetEnv AccessControlAllowOrigin https://ns.example.com
  # allow access by nightscout-reporter (@zreptil)
  #SetEnvIf Origin "https://nightscout-reporter.zreptil.de$" AccessControlAllowOrigin=$0
  Header set Access-Control-Allow-Origin %{AccessControlAllowOrigin}e env=AccessControlAllowOrigin
  Header set Access-Control-Allow-Credentials true
</VirtualHost>

Deployment

Grab the example docker-compose.yml file and change it to meet your needs. You need to use an explicit version tag for the docker image - the latest tag is missing intentionally!

Details of the configuration parameters can be found in Nightscout's README.md.

Upgrading

You need to check Nightscout Releases to look for changes. If a docker image of liske/cgm-remote-monitor with a new release tag is available you just need to update your docker-compose.yml file. Running docker-compose up again will restart Nightscout using the new image.

cgm-remote-monitor-docker's People

Contributors

liske avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.