Skip to content

Commit

Permalink
Merge pull request #4596 from cweider/docker-chores
Browse files Browse the repository at this point in the history
  • Loading branch information
mlissner authored Oct 20, 2024
2 parents 7156c96 + c1d6405 commit 2fa686c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
1 change: 0 additions & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ jobs:
with:
languages: python
config-file: ./.github/codeql-config.yml
setup-python-dependencies: true

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
5 changes: 3 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,21 +97,22 @@ jobs:
docker exec -e SELENIUM_DEBUG=1 -e SELENIUM_TIMEOUT=30 cl-django
python /opt/courtlistener/manage.py test
cl --verbosity=2 ${{ matrix.tag_flags }} --parallel
- name: cp selenium results from docker to host
- name: Export selenium results from docker to host
if: failure()
run: |
# This is annoying b/c docker cp doesn't support globs. See:
# https://stackoverflow.com/q/35806102/
# https://github.com/moby/moby/issues/7710
mkdir selenium-screenshots
docker exec cl-django bash -c "mkdir /extract && mv /tmp/*-selenium.png /extract"
docker exec cl-django bash -c "mkdir /extract && mv /tmp/*-selenium.png /extract ||:"
docker cp 'cl-django:/extract' selenium-screenshots/
- name: Save selenium screenshot as Github artifacts
uses: actions/upload-artifact@master
if: failure()
with:
name: selenium-screenshots
path: selenium-screenshots/extract
if-no-files-found: ignore

# Cancel the current workflow (tests) for pull requests (head_ref) only. See:
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#example-using-a-fallback-value
Expand Down
7 changes: 3 additions & 4 deletions docker/django/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.13-slim as build-base
FROM python:3.13-slim AS build-base

RUN apt-get update --option "Acquire::Retries=3" --quiet=2 && \
apt-get install \
Expand Down Expand Up @@ -41,7 +41,7 @@ RUN python -m venv $POETRY_HOME && \
ln -s $POETRY_HOME/bin/poetry "$(dirname $(which python))/poetry" # make accessible via $PATH

ARG BUILD_ENV=prod
FROM build-base as python-base
FROM build-base AS python-base

WORKDIR $PYSETUP_PATH

Expand Down Expand Up @@ -71,8 +71,7 @@ RUN mkdir /var/log/courtlistener \
WORKDIR /opt/courtlistener


## Needs to be two commands so second one can use variables from first.
ENV PYTHONPATH="${PYTHONPATH}:/opt/courtlistener"
ENV PYTHONPATH="/opt/courtlistener"

USER root
## Creates a directory for Hyperscan db
Expand Down

0 comments on commit 2fa686c

Please sign in to comment.