Skip to content

Commit 59bc361

Browse files
Merge branch 'develop' into 'master'
Develop See merge request bitsensor/back-end/elastalert!37
2 parents d7253d5 + c689475 commit 59bc361

File tree

4 files changed

+12
-5
lines changed

4 files changed

+12
-5
lines changed

Dockerfile

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
FROM alpine:latest as py-ea
2-
ARG ELASTALERT_VERSION=v0.1.39
2+
ARG ELASTALERT_VERSION=v0.2.0b2
33
ENV ELASTALERT_VERSION=${ELASTALERT_VERSION}
44
# URL from which to download Elastalert.
55
ARG ELASTALERT_URL=https://github.com/Yelp/elastalert/archive/$ELASTALERT_VERSION.zip
@@ -45,5 +45,12 @@ COPY config/config.json config/config.json
4545
COPY rule_templates/ /opt/elastalert/rule_templates
4646
COPY elastalert_modules/ /opt/elastalert/elastalert_modules
4747

48+
# Add default rules directory
49+
# Set permission as unpriviledged user (1000:1000), compatible with Kubernetes
50+
RUN mkdir -p /opt/elastalert/rules/ /opt/elastalert/server_data/tests/ \
51+
&& chown -R node:node /opt
52+
53+
USER node
54+
4855
EXPOSE 3030
4956
ENTRYPOINT ["npm", "start"]

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
v ?= v0.1.39
1+
v ?= v0.2.0b2
22

33
all: build
44

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@bitsensor/elastalert",
3-
"version": "2.0.1",
3+
"version": "3.0.0-beta.0",
44
"description": "A server that runs ElastAlert and exposes REST API's for manipulating rules and alerts.",
55
"license": "MIT",
66
"main": "index.js",

src/controllers/process/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,10 @@ export default class ProcessController {
4848
});
4949

5050
// Redirect stdin/stderr to logger
51-
if (indexCreate.stdout.toString() !== '') {
51+
if (indexCreate.stdout && indexCreate.stdout.toString() !== '') {
5252
logger.info(indexCreate.stdout.toString());
5353
}
54-
if (indexCreate.stderr.toString() !== '') {
54+
if (indexCreate.stderr && indexCreate.stderr.toString() !== '') {
5555
logger.error(indexCreate.stderr.toString());
5656
}
5757

0 commit comments

Comments
 (0)