@ -1 +1,7 @@ |
|||||
swarmlab.io |
# *[swarmlab.io](www.docs.swarmlab.io)* |
||||
|
|
||||
|
Swarmlab is a powerful collaboration tool that connects tutors and students in a unique all-in-one environment that gets work done fast and easily. |
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
@ -0,0 +1,18 @@ |
|||||
|
version: "3.8" |
||||
|
services: |
||||
|
webapp: |
||||
|
build: ../web |
||||
|
dockerfile: dockerfile |
||||
|
image: webapp:latest |
||||
|
deploy: |
||||
|
mode: replicated |
||||
|
replicas: 2 |
||||
|
restart_policy: |
||||
|
condition: on-failure |
||||
|
delay: 10s |
||||
|
max_attempts: 3 |
||||
|
window: 120s |
||||
|
placement: |
||||
|
max_replicas_per_node: 1 |
||||
|
constraints: |
||||
|
- "node.role==manager" |
@ -1,9 +0,0 @@ |
|||||
var express = require('express'); |
|
||||
var router = express.Router(); |
|
||||
|
|
||||
/* GET users listing. */ |
|
||||
router.get('/', function(req, res, next) { |
|
||||
res.send('respond with a resource'); |
|
||||
}); |
|
||||
|
|
||||
module.exports = router; |
|
@ -0,0 +1,19 @@ |
|||||
|
FROM node:latest |
||||
|
|
||||
|
# 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 |
||||
|
# If you are building your code for production |
||||
|
# RUN npm ci --only=production |
||||
|
|
||||
|
# Bundle app source |
||||
|
COPY . . |
||||
|
|
||||
|
EXPOSE 8080 |
||||
|
CMD [ "node", "./bin/www" ] |
@ -1,6 +1,6 @@ |
|||||
{ |
{ |
||||
"name": "swarmlab.io", |
"name": "swarmlab.io", |
||||
"version": "0.0.0", |
"version": "0.1.0", |
||||
"lockfileVersion": 1, |
"lockfileVersion": 1, |
||||
"requires": true, |
"requires": true, |
||||
"dependencies": { |
"dependencies": { |
Before Width: | Height: | Size: 327 KiB After Width: | Height: | Size: 327 KiB |
Before Width: | Height: | Size: 370 KiB After Width: | Height: | Size: 370 KiB |
Before Width: | Height: | Size: 259 KiB After Width: | Height: | Size: 259 KiB |
Before Width: | Height: | Size: 475 KiB After Width: | Height: | Size: 475 KiB |
@ -1,7 +1,6 @@ |
|||||
var express = require('express'); |
var express = require('express'); |
||||
var router = express.Router(); |
var router = express.Router(); |
||||
|
|
||||
/* GET home page. */ |
|
||||
router.get('/', (req, res, next) => { |
router.get('/', (req, res, next) => { |
||||
res.render('index'); |
res.render('index'); |
||||
}); |
}); |