From 7104348f9eace8cdb9a949ebc6deeff732cab64c Mon Sep 17 00:00:00 2001 From: Taha Yassine Kraiem Date: Mon, 10 Jan 2022 13:48:51 +0100 Subject: [PATCH] feat(api): changed alerts_build script feat(api): changed Dockerfile feat(api): alerts requirements --- api/Dockerfile.alerts | 4 ++-- api/requirements_alerts.txt | 12 ++++++++++++ ee/api/Dockerfile.alerts | 19 ------------------- 3 files changed, 14 insertions(+), 21 deletions(-) create mode 100644 api/requirements_alerts.txt delete mode 100644 ee/api/Dockerfile.alerts diff --git a/api/Dockerfile.alerts b/api/Dockerfile.alerts index 5299a24f5..ff5e7091e 100644 --- a/api/Dockerfile.alerts +++ b/api/Dockerfile.alerts @@ -3,8 +3,8 @@ LABEL Maintainer="Rajesh Rajendran" LABEL Maintainer="KRAIEM Taha Yassine" WORKDIR /work COPY . . -RUN pip install -r requirements.txt -RUN mv .env.default .env && rm app.py && mv app_alerts.py app.py +RUN pip install -r requirements_alerts.txt +RUN mv .env.default .env && mv app_alerts.py app.py ENV pg_minconn 2 # Add Tini diff --git a/api/requirements_alerts.txt b/api/requirements_alerts.txt new file mode 100644 index 000000000..da4f74530 --- /dev/null +++ b/api/requirements_alerts.txt @@ -0,0 +1,12 @@ +requests==2.26.0 +urllib3==1.26.6 +boto3==1.16.1 +psycopg2-binary==2.8.6 + + + +fastapi==0.70.1 +uvicorn[standard]==0.16.0 +python-decouple==3.5 +pydantic[email]==1.8.2 +apscheduler==3.8.1 \ No newline at end of file diff --git a/ee/api/Dockerfile.alerts b/ee/api/Dockerfile.alerts deleted file mode 100644 index b2e3bf48e..000000000 --- a/ee/api/Dockerfile.alerts +++ /dev/null @@ -1,19 +0,0 @@ -FROM python:3.9.7-slim -LABEL Maintainer="Rajesh Rajendran" -LABEL Maintainer="KRAIEM Taha Yassine" -RUN apt-get update && apt-get install -y pkg-config libxmlsec1-dev gcc && rm -rf /var/lib/apt/lists/* -WORKDIR /work -COPY . . -RUN pip install -r requirements.txt -RUN mv .env.default .env && rm app.py && mv app_alerts.py app.py -ENV pg_minconn 2 - -# Add Tini -# Startup daemon -ENV TINI_VERSION v0.19.0 -ARG envarg -ENV ENTERPRISE_BUILD ${envarg} -ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /tini -RUN chmod +x /tini -ENTRYPOINT ["/tini", "--"] -CMD ./entrypoint.sh