File tree Expand file tree Collapse file tree 4 files changed +12
-5
lines changed
Expand file tree Collapse file tree 4 files changed +12
-5
lines changed Original file line number Diff line number Diff line change 11FROM alpine:latest as py-ea
2- ARG ELASTALERT_VERSION=v0.1.39
2+ ARG ELASTALERT_VERSION=v0.2.0b2
33ENV ELASTALERT_VERSION=${ELASTALERT_VERSION}
44# URL from which to download Elastalert.
55ARG ELASTALERT_URL=https://github.com/Yelp/elastalert/archive/$ELASTALERT_VERSION.zip
@@ -45,5 +45,12 @@ COPY config/config.json config/config.json
4545COPY rule_templates/ /opt/elastalert/rule_templates
4646COPY 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+
4855EXPOSE 3030
4956ENTRYPOINT ["npm" , "start" ]
Original file line number Diff line number Diff line change 1- v ?= v0.1.39
1+ v ?= v0.2.0b2
22
33all : build
44
Original file line number Diff line number Diff line change 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" ,
Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments