Dockerfile hinzugefügt, README.md erweitert, listen port auf 0.0.0.0 gestellt
This commit is contained in:
parent
4a5cfe55ac
commit
83c395dcce
|
@ -0,0 +1,2 @@
|
|||
node_modules
|
||||
npm-debug.log
|
|
@ -0,0 +1,17 @@
|
|||
FROM node:16
|
||||
|
||||
# Create app directory
|
||||
WORKDIR /usr/src/app
|
||||
|
||||
# Install app dependencies
|
||||
# A wildcard is used to ensure both package.json AND package-lock.json are copied
|
||||
# where available (npm@5+)
|
||||
COPY package*.json ./
|
||||
|
||||
RUN npm install
|
||||
|
||||
COPY . .
|
||||
|
||||
EXPOSE 9911
|
||||
|
||||
CMD [ "node", "raumstatus.js" ]
|
17
README.md
17
README.md
|
@ -31,3 +31,20 @@ Das meiste an Funktionn wurde wiede raus geworfen weil sich die CTDO infrastrukt
|
|||
sehr verändert hat und einiges kaputt war.
|
||||
|
||||
Der Status zeit nur noch Power und Raumstatus an. Es läuft wie gehabt via nmap-Ping.
|
||||
|
||||
|
||||
|
||||
## Dev hinweise
|
||||
|
||||
Man braucht dieses repo, nodejs ~16 mit npm.
|
||||
|
||||
|
||||
Dependencies installieren und Server lokal laufen lassen:
|
||||
|
||||
npm install
|
||||
node raumstatus.js
|
||||
|
||||
|
||||
Docker container bauen:
|
||||
|
||||
docker build . -t ctdo/ctdo-raumstatus
|
|
@ -68,8 +68,9 @@ var flukso = new Flukso("flukso.raum.ctdo.de", "/sensor/cf00e0b22230f4a8870af58f
|
|||
var mqtt = mqttClient.connect('mqtt://raum.ctdo.de');
|
||||
var connected = false;
|
||||
|
||||
//express js settings
|
||||
var port = '9911';
|
||||
var address = 'localhost';
|
||||
var address = '0.0.0.0';
|
||||
|
||||
|
||||
ippoll.on('doneState', function (state) {
|
||||
|
|
Loading…
Reference in New Issue