updated for new view

master
Marc Wäckerlin 6 years ago
parent 4d4f2e9a92
commit 5b14b54d1e
  1. 34
      README.md
  2. 2
      bin/www
  3. 6
      client/servicedock.js
  4. 9
      package.json
  5. 2
      style/style.styl

@ -0,0 +1,34 @@
ServiceDock — Docker Swarm as a Service
=======================================
Docker swarm is cool, much simpler to use than OpenShift, but unfortunately I did not find a really nice overview Web-UI to monitor the services, so I created [this one](https://mrw.sh/webservices/servicedock).
Run
---
### Command-Line:
docker run --rm -it -p 8888:4000 -v /var/run/docker.sock:/var/run/docker.sock:ro mwaeckerlin/servicedock:latest
### YAML to Deploy in Swarm:
```yaml
version: '3.7'
services:
servicedock:
image: mwaeckerlin/servicedock
volumes:
- type: bind
source: /var/run/docker.sock
target: /var/run/docker.sock
read-only: true
ports:
- 8035:4000
deploy:
placement:
constraints: [node.role == manager]
resources:
limits:
memory: 100M
```

@ -9,7 +9,7 @@ var server = app.listen(app.get('port'), function() {
debug('Express server listening on port ' + server.address().port)
})
var io = require('socket.io').listen(server)
var docker = require('docker.js')(app, io)
var docker = require('docker.js')(app, io, process.env.UPDATE_INTERVAL||10000, process.env.STATS_INTERVAL||10000)
io.sockets.on('connection', docker.connect)
debug('Socket server listening on port ' + server.address().port);

@ -4,7 +4,7 @@ function error(msg) {
// handle display errors
}
function init() {
socket = io.connect();
docker = new Docker(socket, error, '#containers', '#nodes', '#stacks');
socket = io.connect()
docker = new Docker(socket, error, '#containers', '#nodes', '#stacks')
}
$(init);
$(init)

@ -7,15 +7,18 @@
},
"dependencies": {
"body-parser": "*",
"child_process": "^1.0.2",
"cookie-parser": "*",
"debug": "*",
"docker.js": ">=1.2.0",
"docker.js": "^1.2.2",
"express": "*",
"jquery": "^3.1.1",
"morgan": "*",
"pty.js": "*",
"pty.js": "^0.3.1",
"pug": "*",
"socket.io": "*",
"static-favicon": "*",
"stylus": "*"
"stylus": "*",
"viz.js": "^1.4.1"
}
}

@ -4,6 +4,6 @@ body
a
color: #00B7FF
#main > svg
#stacks > svg
width: 100%
height: auto
Loading…
Cancel
Save