From ab44d5ee833bd40585df717cb2d331345221d858 Mon Sep 17 00:00:00 2001 From: Rennan Cordeiro Date: Mon, 30 Jan 2023 13:57:03 -0300 Subject: [PATCH] refactor dockerfile --- docker/django-gunicorn/Dockerfile | 7 ++++++- web_install.py | 6 ------ 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/docker/django-gunicorn/Dockerfile b/docker/django-gunicorn/Dockerfile index 87c10ebf..10b440ab 100644 --- a/docker/django-gunicorn/Dockerfile +++ b/docker/django-gunicorn/Dockerfile @@ -26,15 +26,20 @@ RUN mkdir $APP_HOME/staticfiles WORKDIR $APP_HOME COPY requirements.txt . +RUN pip install -U pip +RUN pip install -r requirements.txt + COPY *.py ./ COPY src src +RUN python3 web_install.py +RUN pip install pyee==9 + COPY main main COPY interface interface COPY crawler_manager crawler_manager RUN mkdir logs -RUN python3 web_install.py RUN mkdir /data RUN chown django:django /data diff --git a/web_install.py b/web_install.py index 10dda680..4f4e5847 100644 --- a/web_install.py +++ b/web_install.py @@ -1,12 +1,6 @@ import os import subprocess -subprocess.run(["pip", "install", "-U", "pip"]) - -print(f"Installing other project dependencies...") -subprocess.run(["pip", "install", "-r" "requirements.txt"]) -print() - # Install modules from src directory, with their dependencies src_folder = "src" for folder in os.listdir(f"{src_folder}"):