mirror of
https://github.com/bckelley/cgm-remote-monitor.git
synced 2026-08-24 03:14:12 -05:00
Integrating docker support
This commit is contained in:
+10
@@ -0,0 +1,10 @@
|
||||
FROM node:0.10.38-slim
|
||||
|
||||
MAINTAINER Nightscout
|
||||
|
||||
# Netcat is required to poll the database, so Nightscout starts when MongoDB is up and running
|
||||
RUN apt-get update && apt-get -y install netcat
|
||||
RUN npm install .
|
||||
|
||||
EXPOSE 1337
|
||||
CMD ["sh", "docker/docker-start.sh"]
|
||||
@@ -41,8 +41,6 @@ function create (env, ctx) {
|
||||
var bundle = require('./bundle')();
|
||||
app.use(bundle);
|
||||
|
||||
// Handle errors with express's errorhandler, to display more readable error messages.
|
||||
|
||||
// Handle errors with express's errorhandler, to display more readable error messages.
|
||||
var errorhandler = require('errorhandler');
|
||||
//if (process.env.NODE_ENV === 'development') {
|
||||
|
||||
Executable
+8
@@ -0,0 +1,8 @@
|
||||
#!/bin/bash
|
||||
|
||||
cd ../
|
||||
|
||||
docker-compose -p nightscout_build -f docker/docker-compose.yml stop
|
||||
docker-compose -p nightscout_build -f docker/docker-compose.yml rm --force -v
|
||||
docker-compose -p nightscout_build -f docker/docker-compose.yml build
|
||||
docker-compose -p nightscout_build -f docker/docker-compose.yml up
|
||||
@@ -0,0 +1,20 @@
|
||||
nightscout:
|
||||
build: ../
|
||||
links:
|
||||
- database
|
||||
- broker
|
||||
ports:
|
||||
- "1337:1337"
|
||||
environment:
|
||||
- MONGO_CONNECTION=mongodb://database/nightscout
|
||||
- API_SECRET=mylittlesecret
|
||||
- MQTT_MONITOR=mqtt://broker
|
||||
- PORT=1337
|
||||
database:
|
||||
image: mongo:3.0.3
|
||||
ports:
|
||||
- "27017"
|
||||
broker:
|
||||
image: prologic/mosquitto
|
||||
ports:
|
||||
- "1883"
|
||||
@@ -7,7 +7,6 @@ var consts = require('./lib/constants');
|
||||
var fs = require('fs');
|
||||
// Module to constrain all config and environment parsing to one spot.
|
||||
function config ( ) {
|
||||
|
||||
/*
|
||||
* First inspect a bunch of environment variables:
|
||||
* * PORT - serve http on this port
|
||||
|
||||
Reference in New Issue
Block a user