-
Notifications
You must be signed in to change notification settings - Fork 201
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve Docker configuration #497
Commits on Jul 23, 2021
-
Show static files in docker setup
After 312160c docker-compose doesn't load static files as the server runs in development mode without DEBUG enabled. Also, this commit makes sure it is loud and heard that running via docker is not safe. Signed-off-by: Hritik Vijay <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 7f69f92 - Browse repository at this point
Copy the full SHA 7f69f92View commit details -
Remove remaining traces of DJANGO_DEV
DJANGO_DEV is obsolete and now nowhere exists in the entire codebase Signed-off-by: Hritik Vijay <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for ce64bce - Browse repository at this point
Copy the full SHA ce64bceView commit details -
Use nginx server in docker with gunicorn support
The docker setup present earlier used django development server to host vulnerablecode, this is neither recommended nor safe. Also the server did not drop privileges. Docker environment vars are now easily configured via docker.env, also the nginx template present in etc/nginx could be used in a non docker setup with slight modifications. Signed-off-by: Hritik Vijay <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 55faf69 - Browse repository at this point
Copy the full SHA 55faf69View commit details
Commits on Jul 28, 2021
-
Inspired by ScancodeIO. This Makefile makes the installation easy as a cake. The virtualenv zipapp used in this commit is obtained from https://bootstrap.pypa.io/virtualenv/3.8/virtualenv.pyz Note: sqlite support in this makefile is not implemented yet. It will be done in next commits in this PR. Signed-off-by: Hritik Vijay <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for be53bb7 - Browse repository at this point
Copy the full SHA be53bb7View commit details -
Update CI unit tests to use Makefile
This will be essential after later commits as the existence of SECRET_KEY in .env or environment is going to be non-optional. Signed-off-by: Hritik Vijay <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 24d8b1d - Browse repository at this point
Copy the full SHA 24d8b1dView commit details -
Update Travis CI to use Makefile
This is not essential but promotes uniformity. Also, `collectstatic` is removed from this test as this is not really necessary. Signed-off-by: Hritik Vijay <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for d24dcb2 - Browse repository at this point
Copy the full SHA d24dcb2View commit details -
Make Settings consistent with scancodeio
Inspired by scancodeio, we now have a consistent ALLOWED_HOSTS environment variable support. SECRET_KEY no longer defaults to insecure values and is required to be generated. Static files are now served in /var/vulnerablecode/static which is consistent to scancodeio. Signed-off-by: Hritik Vijay <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for e01dc44 - Browse repository at this point
Copy the full SHA e01dc44View commit details -
File hierarchy inside docker container now looks similar to scancodeio. postgres data is now a docker volume, so it will persist even after recreation. .dockerignores makes sure that we don't overpopulate docker images, improving build times. A common environment variable for containers is kept in docker.env The python image we are using now explicitly states python:3.8 NOTE: We should have a postgres health check script which uses python manage.py check --database default which comes with max_retries and backoffs for `vulnerablecode` container. Currently, docker's `restart:` option is used but it has a caveat that it'll restart on non-db errors as well. Signed-off-by: Hritik Vijay <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 25292dd - Browse repository at this point
Copy the full SHA 25292ddView commit details -
Add Docker related documentation
This calls for a lot of changes in other parts of documentation as well. This will be done in later PRs. This commit marks the end of this PR. Signed-off-by: Hritik Vijay <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 1ab0b28 - Browse repository at this point
Copy the full SHA 1ab0b28View commit details -
Revert Use cache for pip in CI test
This commit gets rid of using any type of cache (introduced in 135c95f) This is to ensure having no surprises in future. This was discussed in https://github.com/nexB/vulnerablecode/wiki/WeeklyMeetings#meeting-on-tuesday-2021-07-27-at-1300-utc Signed-off-by: Hritik Vijay <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for c024620 - Browse repository at this point
Copy the full SHA c024620View commit details -
These are redundant after PR# 295. Signed-off-by: Hritik Vijay <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for b69dee2 - Browse repository at this point
Copy the full SHA b69dee2View commit details