Skip to content

Commit

Permalink
Merge pull request #10006 from MPMG-DCC-UFMG/issue-10005
Browse files Browse the repository at this point in the history
Issue 10005 - Refatora dockerfile para acelerar execução de build
  • Loading branch information
rennancl authored Feb 7, 2023
2 parents d3bd026 + ab44d5e commit 3f4b287
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
7 changes: 6 additions & 1 deletion docker/django-gunicorn/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 0 additions & 6 deletions web_install.py
Original file line number Diff line number Diff line change
@@ -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}"):
Expand Down

0 comments on commit 3f4b287

Please sign in to comment.