Commit 49877755 authored by Kamron Aroonrua's avatar Kamron Aroonrua 💬

1.2.3r

parent 8e612764
BIGSTREAM_TAG=dev
BIGSTREAM_TAG=test
BS_SECRET=bigstream-server
REDIS_TAG=4
PREFIX_NO=19
VOLUME=../volume
\ No newline at end of file
VOLUME=~/bsvolume
\ No newline at end of file
#Changelog
## [1.2.3-UR]
## [1.2.3] - 2021-05-05
### Update
- AMQPLib Support Heartbeat Monitoring
- RedisLib
### Fixed
- BS :: AMQP RPC Singleton Connection ,auto ack
- STORAGE :: 50x speedup
......
......@@ -10,6 +10,7 @@ RUN npm install
RUN node script/install_plugins.js
FROM node:12-alpine
RUN apk add --no-cache python
COPY --from=0 /app/node-bigstream /app/node-bigstream
......
[
{"env":"BSCONFIG_AMQP_TYPE","conf":"amqp.type"},
{"env":"BSCONFIG_AMQP_URL","conf":"amqp.url"},
{"env":"BSCONFIG_MQTT_URL","conf":"mqtt.url"},
{"env":"BSCONFIG_MEMSTORE_TYPE","conf":"memstore.type"},
{"env":"BSCONFIG_MEMSTORE_URL","conf":"memstore.url"},
{"env":"BSCONFIG_STORAGE_REPOSITORY","conf":"storage.repository"},
{"env":"BSCONFIG_STORAGE_APIHOSTNAME","conf":"storage.api_hostname"},
{"env":"BSCONFIG_SECRET_TEXT","conf":"auth.secret.value"}
]
\ No newline at end of file
module.exports = require('./default.json');
\ No newline at end of file
#!/bin/bash
docker build --no-cache -t bigstream:test .
......@@ -14,8 +14,9 @@ services:
- "19150:19150/udp"
environment:
- "BS_SECRET=${BS_SECRET}"
- "BSCONFIG_HTTPLISTENER_MAXBODY=128mb"
volumes:
- bsdata:/var/bigstream/data
- ${VOLUME:-./volume}/bigstream/data:/var/bigstream/data
redis:
image: "redis:${REDIS_TAG}"
command: redis-server --appendonly yes
......@@ -28,7 +29,7 @@ services:
ports:
- "6379:6379"
volumes:
- bsredis:/data
- ${VOLUME:-./volume}/redis/data:/data
rabbitmq:
image: "igridproject/rabbitmq"
command: rabbitmq-server --hostname rabbitmq-server
......@@ -40,9 +41,6 @@ services:
- rabbitmq-server
ports:
- "5672:5672"
volumes:
bsdata:
bsredis:
networks:
bsnet:
driver: bridge
\ No newline at end of file
......@@ -2,10 +2,12 @@
{"env":"BSCONFIG_AMQP_TYPE","conf":"amqp.type"},
{"env":"BSCONFIG_AMQP_URL","conf":"amqp.url"},
{"env":"BSCONFIG_MQTT_URL","conf":"mqtt.url"},
{"env":"BSCONFIG_HTTPLISTENER_MAXBODY","conf":"httplistener.max_body"},
{"env":"BSCONFIG_MEMSTORE_TYPE","conf":"memstore.type"},
{"env":"BSCONFIG_MEMSTORE_URL","conf":"memstore.url"},
{"env":"BSCONFIG_STORAGE_REPOSITORY","conf":"storage.repository"},
{"env":"BSCONFIG_STORAGE_APIHOSTNAME","conf":"storage.api_hostname"},
{"env":"BSCONFIG_STORAGE_APIMAXBODY","conf":"storage.api_max_body"},
{"env":"BSCONFIG_SECRET_TEXT","conf":"auth.secret.value"},
{"env":"BSCONFIG_KEYSTORE_DIR","conf":"keystore.dir"}
]
\ No newline at end of file
......@@ -48,13 +48,15 @@ HTTPListener.prototype._http_start = function()
}
});
app.use(bodyParser.json({limit: '128mb',type:"*/json"}));
var MAX_BODY = ctx.getConfig('httplistener.max_body','128mb')
app.use(bodyParser.json({limit: MAX_BODY,type:"*/json"}));
app.use(bodyParser.urlencoded({
extended: true,
limit: '128mb'
limit: MAX_BODY
}));
app.use(bodyParser.text({limit: '128mb',type:"text/*"}));
app.use(bodyParser.raw({limit: '128mb',type:"*/*"}));
app.use(bodyParser.text({limit: MAX_BODY,type:"text/*"}));
app.use(bodyParser.raw({limit: MAX_BODY,type:"*/*"}));
var context = require('./lib/http-context');
app.use(context.middleware({
......
......@@ -10,7 +10,7 @@
"keywords": [],
"license": "Apache-2.0",
"dependencies": {
"amqplib": "^0.4.2",
"amqplib": "^0.7.1",
"async": "^2.0.1",
"axon": "^2.0.3",
"body-parser": "^1.15.2",
......@@ -34,13 +34,14 @@
"query-string": "^4.2.3",
"quickq": "^0.8.1",
"random-access-file": "^1.3.0",
"redis": "^2.6.5",
"redis": "^3.1.2",
"request": "^2.79.0",
"thunky": "^1.0.2",
"tiny-worker": "^2.1.1"
}, "scripts": {
},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"install": "node ./script/install_plugins.js",
"install_plugins": "node ./script/install_plugins.js",
"start": "pm2 start pm2-default.json",
"stop": "pm2 stop pm2-default.json"
}
......
This diff is collapsed.
......@@ -8,7 +8,8 @@ module.exports = {
"name" : "bs.storage.read",
"script" : "./serv-storage.js",
"args" : "--process-read",
"exec_mode" : "cluster"
"exec_mode" : "cluster",
"instances" : process.env['BS_NUM_READER']||2
},
{
"name" : "bs.worker",
......@@ -22,7 +23,9 @@ module.exports = {
},
{
"name" : "bs.trigger.httplistener",
"script" : "./serv-httplistener.js"
"script" : "./serv-httplistener.js",
"exec_mode" : "cluster",
"instances" : process.env['BS_NUM_HTTPLISTENER']||2
},
{
"name" : "bs.api.service",
......
......@@ -140,7 +140,7 @@ SS.prototype.http_start = function()
var API_PORT = (this.config.storage.api_port)?this.config.storage.api_port:19080;
app.use(bodyParser.json({limit: '64mb'}));
app.use(bodyParser.json({limit: ctx.getConfig('storage.api_max_body','128mb')}));
app.use(bodyParser.urlencoded({
extended: true
}));
......
{
"version":"1.2.3",
"build":"202104080000"
"build":"202105050000"
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment