-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
perf: updated Dockerfile to optimize requirements installation and de…
…pendency caching
- Loading branch information
1 parent
07d6d95
commit ba8fcee
Showing
2 changed files
with
11 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -51,17 +51,20 @@ ENV PYTHON_VERSION "${PYTHON_VERSION}" | |
RUN curl -sS https://bootstrap.pypa.io/get-pip.py | python${PYTHON_VERSION} | ||
RUN pip install virtualenv | ||
|
||
# cloning git repo | ||
RUN curl -L https://github.com/edx/edx-analytics-dashboard//archive/refs/heads/master.tar.gz | tar -xz --strip-components=1 | ||
# Create required directories for requirements | ||
RUN mkdir -p requirements | ||
|
||
# No need to activate insights virtualenv as it is already activated by putting in the path | ||
RUN virtualenv -p python${PYTHON_VERSION} --always-copy ${INSIGHTS_VENV_DIR} | ||
|
||
ENV PATH="${INSIGHTS_CODE_DIR}/node_modules/.bin:$PATH" | ||
|
||
# insights service config commands below | ||
RUN curl -L -o requirements/production.txt https://raw.githubusercontent.com/edx/edx-analytics-dashboard/master/requirements/production.txt | ||
RUN pip install --no-cache-dir -r requirements/production.txt | ||
|
||
RUN curl -L https://github.com/edx/edx-analytics-dashboard/archive/refs/heads/master.tar.gz | tar -xz --strip-components=1 | ||
|
||
RUN nodeenv ${INSIGHTS_NODEENV_DIR} --node=18.20.2 --prebuilt \ | ||
&& npm install -g [email protected] | ||
|
||
|
@@ -72,6 +75,7 @@ EXPOSE 18110 | |
|
||
FROM app as dev | ||
Check warning on line 76 in dockerfiles/edx-analytics-dashboard.Dockerfile GitHub Actions / build-and-push-imageThe 'as' keyword should match the case of the 'from' keyword
|
||
|
||
RUN curl -L -o requirements/local.txt https://raw.githubusercontent.com/edx/edx-analytics-dashboard/master/requirements/local.txt | ||
RUN pip install --no-cache-dir -r requirements/local.txt | ||
|
||
ENV DJANGO_SETTINGS_MODULE "analytics_dashboard.settings.devstack" | ||
|