Skip to content

Commit

Permalink
Stable Cluster mode!
Browse files Browse the repository at this point in the history
  • Loading branch information
freaker2k7 committed Jul 28, 2019
1 parent e73bb57 commit c275ed2
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 11 deletions.
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
# Changelog

## [1.8.0] - 28/7/2019
**Stable Cluster mode!**

## [1.7.9] - 28/7/2019
Added Liberapay badge.

## [1.7.8] - 27/7/2019
Fixed bin
Fixed test

## [1.7.7] - 27/7/2019
Renamed npm-shrinkwrap.json to package-lock.json and added it to git.
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM node:12

RUN curl -L https://get.docker.com | sh -
RUN npm i -g docker-server@1.7.9
RUN npm i -g docker-server@1.8.0

CMD ["docker-server"]
6 changes: 2 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -356,11 +356,9 @@ And/or

## Changelog

1.7.9 - Added Liberapay badge.

1.7.8 - Fixed bin
1.8.0 - **Stable Cluster** mode!

1.7.7 - Renamed npm-shrinkwrap.json to package-lock.json and added it to git.
1.7.9 - Added Liberapay badge.

[See full changelog](https://github.com/freaker2k7/dockerserver/blob/master/CHANGELOG.md)

Expand Down
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ app.use(network.check(token));

// Body parsers
app.use(express.json({limit: '10kb'}));
app.use(express.urlencoded({extended: false, limit: '10kb'}));
app.use(express.urlencoded({extended: true, limit: '10kb'}));

app.use(network.balance(args.port));

Expand Down
5 changes: 2 additions & 3 deletions lib/network.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ var get_req = function(req, host) {
return new Promise(function(resolve) {
return request({
url: host + req.originalUrl,
headers: Object.assign(req.headers, {'docker-server': 'force', 'content-type': 'application/json'}),
form: req.body,
headers: {'docker-server': 'force', 'content-type': 'application/json', 'authorization': req.get('Authorization')},
body: req.body && JSON.stringify(req.body) || undefined,
method: req.method
}, function (err, res, body) {
// console.log('request:', host, err, typeof body, body);
Expand Down Expand Up @@ -125,7 +125,6 @@ module.exports = function(cli_args) {
}

return function (req, res, next) {
// console.log('000 ??? body', JSON.stringify(req.body));
if (args.cluster && req.get('docker-server') !== 'force') {
handle_cluster(req, res, next);
} else {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "docker-server",
"author": "Evgeny Kolyakov <thenetfreaker@gmail.com>",
"description": "DockerServer - Super lightweight & simple RESTFul stateless server for running docker containers on a remote machine(s) in a secure way",
"version": "1.7.9",
"version": "1.8.0",
"homepage": "https://dockerserver.io",
"repository": "freaker2k7/dockerserver",
"license": "Apache-2.0",
Expand Down

0 comments on commit c275ed2

Please sign in to comment.