From 23584b8be86e4bda2f074cd74bc09f1ae52351fe Mon Sep 17 00:00:00 2001 From: Taha Yassine Kraiem Date: Fri, 6 May 2022 18:36:46 +0200 Subject: [PATCH] feat(alerts): changed Dockerfile.alerts --- api/Dockerfile.alerts | 15 +++++++++------ ee/api/Dockerfile.alerts | 14 +++++++++----- 2 files changed, 18 insertions(+), 11 deletions(-) diff --git a/api/Dockerfile.alerts b/api/Dockerfile.alerts index 76e8c262a..c7e8c7a37 100644 --- a/api/Dockerfile.alerts +++ b/api/Dockerfile.alerts @@ -1,13 +1,8 @@ FROM python:3.9.10-slim LABEL Maintainer="Rajesh Rajendran" LABEL Maintainer="KRAIEM Taha Yassine" -WORKDIR /work -COPY . . -RUN pip install -r requirements.txt -RUN mv .env.default .env && mv app_alerts.py app.py && mv entrypoint_alerts.sh entrypoint.sh -ENV pg_minconn 2 ENV APP_NAME alerts - +ENV pg_minconn 2 # Add Tini # Startup daemon ENV TINI_VERSION v0.19.0 @@ -15,5 +10,13 @@ ARG envarg ENV ENTERPRISE_BUILD ${envarg} ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /tini RUN chmod +x /tini + +COPY requirements.txt /work_tmp/requirements.txt +RUN pip install -r /work_tmp/requirements.txt + +WORKDIR /work +COPY . . +RUN mv .env.default .env && mv app_alerts.py app.py && mv entrypoint_alerts.sh entrypoint.sh + ENTRYPOINT ["/tini", "--"] CMD ./entrypoint.sh \ No newline at end of file diff --git a/ee/api/Dockerfile.alerts b/ee/api/Dockerfile.alerts index 6aec0f98b..2864848e9 100644 --- a/ee/api/Dockerfile.alerts +++ b/ee/api/Dockerfile.alerts @@ -2,12 +2,8 @@ FROM python:3.9.10-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 && mv app_alerts.py app.py && mv entrypoint_alerts.sh entrypoint.sh -ENV pg_minconn 2 ENV APP_NAME alerts +ENV pg_minconn 2 # Add Tini # Startup daemon @@ -16,5 +12,13 @@ ARG envarg ENV ENTERPRISE_BUILD ${envarg} ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /tini RUN chmod +x /tini + +COPY requirements.txt /work_tmp/requirements.txt +RUN pip install -r /work_tmp/requirements.txt + +WORKDIR /work +COPY . . +RUN mv .env.default .env && mv app_alerts.py app.py && mv entrypoint_alerts.sh entrypoint.sh + ENTRYPOINT ["/tini", "--"] CMD ./entrypoint.sh \ No newline at end of file