Skip to content

Docker: set STATIC_ROOT to /var/vulnerablecode/static/ - #569

Merged
pombredanne merged 2 commits into
aboutcode-org:mainfrom
vbisserie:dev/docker
Oct 8, 2021
Merged

Docker: set STATIC_ROOT to /var/vulnerablecode/static/#569
pombredanne merged 2 commits into
aboutcode-org:mainfrom
vbisserie:dev/docker

Conversation

@vbisserie

Copy link
Copy Markdown

As defined in docker-compose.yaml, vulnerablecode docker executes:

      ./manage.py migrate &&
      ./manage.py collectstatic --no-input --clear &&
      gunicorn vulnerablecode.wsgi:application -u nobody -g nogroup --bind :8000 --timeout 600 --workers 2

Command ./manage.py collectstatic --no-input --clear clears static directory.
As STATIC_ROOT = "./", and in Dockerfile WORKDIR /opt/vulnerablecode, it means that all sources are Deleted.

When we try to docker-compose up, following error happens:

/bin/sh: 1: ./manage.py: not found

VULNERABLECODE_STATIC_ROOT defines the static directory location.

Signed-off-by: Vincent Bisserie vincent.bisserie@renault.com

Signed-off-by: Vincent Bisserie <vincent.bisserie@renault.com>

@pombredanne pombredanne left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sleek and neat. Thank you++!

@pombredanne

Copy link
Copy Markdown
Member

And thank you for the doc cleanup too!

@pombredanne
pombredanne merged commit 4677f70 into aboutcode-org:main Oct 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants