diff --git a/Dockerfile b/Dockerfile index 3cc935436..c4308986e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,7 +6,8 @@ ENV PYTHONUNBUFFERED 1 RUN mkdir /vulnerablecode WORKDIR /vulnerablecode ADD . /vulnerablecode/ -RUN pip install -r requirements.txt +RUN pip install -r requirements.txt && \ + DJANGO_DEV=1 python manage.py collectstatic LABEL "base_image": "pkg:docker/python@sha256%3Ae9b7e3b4e9569808066c5901b8a9ad315a9f14ae8d3949ece22ae339fff2cad0" LABEL "dockerfile_url": "https://github.com/nexB/vulnerablecode/blob/develop/Dockerfile" diff --git a/README.rst b/README.rst index d328634c9..87428ea54 100644 --- a/README.rst +++ b/README.rst @@ -141,11 +141,12 @@ On Debian-based distros, these can be installed with:: **Application dependencies** -Create a virtualenv, install dependencies, and run the database migrations:: +Create a virtualenv, install dependencies, generate static files and run the database migrations:: python3 -m venv venv source venv/bin/activate pip install -r requirements.txt + DJANGO_DEV=1 python manage.py collectstatic DJANGO_DEV=1 python manage.py migrate The environment variable ``DJANGO_DEV`` is used to load settings suitable for diff --git a/vulnerablecode/settings.py b/vulnerablecode/settings.py index 7c829e82f..c21db3ca3 100644 --- a/vulnerablecode/settings.py +++ b/vulnerablecode/settings.py @@ -26,6 +26,7 @@ # SECURITY WARNING: don't run with debug turned on in production! DEBUG = False +DEBUG_PROPAGATE_EXCEPTIONS = True ALLOWED_HOSTS = [ ".herokuapp.com",