Skip to content

Commit 8f1fa6a

Browse files
committed
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 <hritikxx8@gmail.com>
1 parent c405fa2 commit 8f1fa6a

1 file changed

Lines changed: 9 additions & 24 deletions

File tree

README.rst

Lines changed: 9 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -90,29 +90,10 @@ First clone the source code::
9090
cd vulnerablecode
9191

9292

93-
94-
9593
Using Docker Compose
96-
~~~~~~~~~~~~~~~~~~~~
97-
98-
An easy way to set up VulnerableCode is with docker containers and docker
99-
compose. For this you need to have the following installed.
100-
101-
- Docker Engine. Find instructions to install it
102-
`here <https://docs.docker.com/get-docker/>`__
103-
- Docker Compose. Find instructions to install it
104-
`here <https://docs.docker.com/compose/install/#install-compose>`__
105-
106-
Use ``sudo docker-compose up`` to start VulnerableCode. Then access
107-
VulnerableCode at http://localhost:8000/ or at http://127.0.0.1:8000/
108-
109-
**Important**: Don't forget to run ``sudo docker-compose up -d --no-deps --build vulnerablecode`` to sync your instance after every ``git pull``.
110-
111-
112-
Use ``sudo docker-compose exec vulnerablecode bash`` to access the VulnerableCode
113-
container. From here you can access ``manage.py`` and run management commands
114-
to import data as specified below.
94+
---------------------
11595

96+
Please find the docker documentation in `Docker Installation <docs/docker_installation.rst>`__
11697

11798
Without Docker Compose
11899
~~~~~~~~~~~~~~~~~~~~~~
@@ -159,11 +140,13 @@ for this purpose::
159140

160141
SECRET_KEY=$(python -c "from django.core.management import utils; print(utils.get_random_secret_key())")
161142

162-
You will also need to setup the VC_ALLOWED_HOSTS environment variable to match the hostname where the app is deployed::
143+
You will also need to setup the `ALLOWED_HOSTS` array inside `vulnerablecode/settings.py` according to
144+
[django specifications](https://docs.djangoproject.com/en/3.2/ref/settings/#allowed-hosts). One example would be:
145+
.. code-block:: python
163146
164-
VC_ALLOWED_HOSTS=vulnerablecode.your.domain.example.com
147+
ALLOWED_HOSTS = ['vulnerablecode.your.domain.example.com']
165148
166-
You can specify several host by separating them with a colon `:`
149+
You can specify several hosts by separating them with a comma (`,`)
167150

168151
Using Nix
169152
~~~~~~~~~
@@ -213,6 +196,8 @@ Use these commands to run code style checks and the test suite::
213196
python -m pytest
214197

215198

199+
.. _Data import:
200+
216201
Data import
217202
-----------
218203

0 commit comments

Comments
 (0)