Skip to content

Commit

Permalink
praecoapp/elastalert-server:20240104
Browse files Browse the repository at this point in the history
  • Loading branch information
nsano-rururu committed Jan 4, 2024
1 parent 3eff249 commit db3e85b
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
16.20.2
18.19.0
16 changes: 16 additions & 0 deletions DockerImageLog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
# praecoapp/elastalert-server:20240104

## New features

None

## Bug Fix

None

## Other changes

- node:16.20.2-alpine3.18 to node:18.19.0-alpine3.19
- python:3.11-alpine3.18 to python:3.11-alpine3.19
- Library Update

# praecoapp/elastalert-server:20231126

## New features
Expand Down
12 changes: 6 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Stage 1: Build Elastalert
FROM python:3.11-alpine3.18 as elastalert-builder
FROM python:3.11-alpine3.19 as elastalert-builder
ARG ELASTALERT_VERSION=2.15.0
ENV ELASTALERT_VERSION=${ELASTALERT_VERSION}
ARG ELASTALERT_URL=https://github.com/jertel/elastalert2/archive/refs/tags/$ELASTALERT_VERSION.zip
Expand All @@ -15,7 +15,7 @@ RUN apk add --update --no-cache wget unzip && \
mv e* "${ELASTALERT_HOME}"

# Stage 2: Install Dependencies
FROM node:16.20.2-alpine3.18 as install
FROM node:18.19.0-alpine3.19 as install
ENV PATH /home/node/.local/bin:$PATH

RUN apk add --update --no-cache \
Expand All @@ -41,17 +41,17 @@ WORKDIR /opt/elastalert-server
COPY . /opt/elastalert-server

RUN npm install --omit=dev --quiet && \
pip3 install --no-cache-dir --upgrade pip==23.3.1
pip3 install --no-cache-dir --upgrade pip==23.3.2 --break-system-packages

USER node

WORKDIR /opt/elastalert

RUN pip3 install --no-cache-dir cryptography --user && \
pip3 install --no-cache-dir -r requirements.txt --user
RUN pip3 install --no-cache-dir cryptography --prefix=/home/node/.local --break-system-packages && \
pip3 install --no-cache-dir -r requirements.txt --prefix=/home/node/.local --break-system-packages

# Stage 3: Final Image
FROM node:16.20.2-alpine3.18
FROM node:18.19.0-alpine3.19
LABEL maintainer="John Susek <[email protected]>"
ENV TZ Etc/UTC
ENV PATH /home/node/.local/bin:$PATH
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ v ?= 2.15.0
all: build

build:
docker pull python:3.11-alpine3.18 && docker pull node:16.20.2-alpine3.18
docker pull python:3.11-alpine3.19 && docker pull node:18.19.0-alpine3.19
docker build --build-arg ELASTALERT_VERSION=$(v) -t praecoapp/elastalert-server .

server: build
Expand Down
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@

**TODO**

- [ ] node 16 to 18
- [x] node 16 to 18
- [ ] node 18 to 20
- [ ] Add TestCode
- [ ] javascript to typescript
- [ ] Support Elasticsearch ApiKey authentication connection
Expand Down Expand Up @@ -53,7 +54,7 @@ make build
```
which is equivalent of
```
docker pull python:3.11-alpine3.18 && docker pull node:16.20.2-alpine3.18
docker pull python:3.11-alpine3.19 && docker pull node:18.19.0-alpine3.19
docker build -t elastalert-server .
```

Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@johnsusek/elastalert-server",
"version": "20231126",
"version": "20240104",
"description": "A server that runs ElastAlert and exposes REST API's for manipulating rules and alerts.",
"license": "MIT",
"main": "index.js",
Expand All @@ -23,7 +23,7 @@
"@babel/preset-env": "^7.23.7",
"@babel/register": "^7.23.7",
"@opensearch-project/opensearch": "^2.4.0",
"axios": "^1.6.3",
"axios": "^1.6.4",
"bunyan": "^1.8.15",
"cors": "^2.8.5",
"cpu-stat": "^2.0.1",
Expand Down

0 comments on commit db3e85b

Please sign in to comment.