Skip to content

Commit

Permalink
refactor: remove redundant curl command
Browse files Browse the repository at this point in the history
  • Loading branch information
BilalQamar95 committed Oct 18, 2024
1 parent ef6953c commit 6736a9c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/push-edx-analytics-dashboard-image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@ on:
schedule:
- cron: "0 4 * * 1-5" # UTC Time

# Added for testing purposes. Will remove once the PR is finalised
pull_request:
branches:
- '**'

jobs:
build-and-push-image:
runs-on: ubuntu-latest
Expand Down
9 changes: 5 additions & 4 deletions dockerfiles/edx-analytics-dashboard.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,16 @@ ENV PYTHON_VERSION "${PYTHON_VERSION}"
RUN curl -sS https://bootstrap.pypa.io/get-pip.py | python${PYTHON_VERSION}
RUN pip install virtualenv

# 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"

WORKDIR ${INSIGHTS_CODE_DIR}/

# Create required directories for requirements
RUN mkdir -p requirements

# 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
Expand All @@ -75,7 +77,6 @@ EXPOSE 18110

FROM app as dev

Check warning on line 78 in dockerfiles/edx-analytics-dashboard.Dockerfile

View workflow job for this annotation

GitHub Actions / build-and-push-image

The 'as' keyword should match the case of the 'from' keyword

FromAsCasing: 'as' and 'FROM' keywords' casing do not match More info: https://docs.docker.com/go/dockerfile/rule/from-as-casing/

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"
Expand Down

0 comments on commit 6736a9c

Please sign in to comment.