Skip to content

Commit f8ab85d

Browse files
gunjansonawCopilot
andcommitted
docs: address Windows Docker review feedback
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Signed-off-by: Gunjan Sonawane <gunjansonawane462@gmail.com>
1 parent 991e20c commit f8ab85d

2 files changed

Lines changed: 32 additions & 35 deletions

File tree

‎docker-compose.windows.yml‎

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
services:
2+
vulnerablecode:
3+
volumes:
4+
- .\vulnerablecode-config:/etc/vulnerablecode/
5+
6+
vulnerablecode_scheduler:
7+
volumes:
8+
- .\vulnerablecode-config:/etc/vulnerablecode/
9+
10+
vulnerablecode_rqworker:
11+
volumes:
12+
- .\vulnerablecode-config:/etc/vulnerablecode/
13+
14+
vulnerablecode_rqworker_high:
15+
volumes:
16+
- .\vulnerablecode-config:/etc/vulnerablecode/

‎docs/source/installation.rst‎

Lines changed: 16 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ to run on a different port than 8000.
9090
.. tip::
9191

9292
Set ``STAGING=False`` in ``.env`` file to disable the staging environment warning.
93+
9394
Windows installation with Docker
9495
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
9596

@@ -101,54 +102,30 @@ Install and start Docker Desktop, then open PowerShell and clone the repository:
101102
git clone https://github.com/aboutcode-org/vulnerablecode.git
102103
cd vulnerablecode
103104

104-
Create the configuration directory and environment file using PowerShell. The
105-
following commands generate secure values for both required settings::
105+
Create the configuration directory and an environment file using PowerShell.
106+
Replace the example values below with your own strong, unique secrets. Do not
107+
use the example values as-is::
106108

107109
New-Item -ItemType Directory -Force .\vulnerablecode-config
108-
$secretKeyBytes = New-Object byte[] 50
109-
$rng = [System.Security.Cryptography.RandomNumberGenerator]::Create()
110-
$rng.GetBytes($secretKeyBytes)
111-
$secretKey = [Convert]::ToBase64String($secretKeyBytes)
112-
113-
$altchaKeyBytes = New-Object byte[] 32
114-
$rng.GetBytes($altchaKeyBytes)
115-
$altchaHmacKey = -join ($altchaKeyBytes | ForEach-Object { $_.ToString("x2") })
116-
$rng.Dispose()
117-
118110
@"
119-
SECRET_KEY="$secretKey"
120-
ALTCHA_HMAC_KEY="$altchaHmacKey"
111+
SECRET_KEY=replace-with-a-strong-random-secret
112+
ALTCHA_HMAC_KEY=replace-with-a-32-byte-hex-value
121113
"@ | Set-Content .\vulnerablecode-config\.env
122114

123-
Create ``docker-compose.override.yml`` with the configuration mount for the
124-
application, scheduler, and both RQ workers::
125-
126-
services:
127-
vulnerablecode:
128-
volumes:
129-
- .\vulnerablecode-config:/etc/vulnerablecode/
130-
vulnerablecode_scheduler:
131-
volumes:
132-
- .\vulnerablecode-config:/etc/vulnerablecode/
133-
vulnerablecode_rqworker:
134-
volumes:
135-
- .\vulnerablecode-config:/etc/vulnerablecode/
136-
vulnerablecode_rqworker_high:
137-
volumes:
138-
- .\vulnerablecode-config:/etc/vulnerablecode/
115+
The repository includes ``docker-compose.windows.yml`` to mount this configuration
116+
directory into the application, scheduler, and RQ worker containers. Start and
117+
check the services with::
139118

140-
Start and check the services::
141-
142-
docker compose up -d
143-
docker compose ps
119+
docker compose -f docker-compose.yml -f docker-compose.windows.yml up -d
120+
docker compose -f docker-compose.yml -f docker-compose.windows.yml ps
144121

145122
VulnerableCode should then be available at::
146123

147124
http://localhost
148125

149126
To stop the services::
150127

151-
docker compose down
128+
docker compose -f docker-compose.yml -f docker-compose.windows.yml down
152129

153130
.. _local_development_installation:
154131

@@ -163,6 +140,10 @@ Supported Platforms
163140
#. **Debian-based** Linux distributions
164141
#. **macOS** 12.1 and up
165142

143+
.. warning::
144+
Native Windows installation is not supported. Windows users can run
145+
VulnerableCode with Docker Desktop; see :ref:`run_with_docker`.
146+
166147
Pre-installation Checklist
167148
^^^^^^^^^^^^^^^^^^^^^^^^^^
168149

0 commit comments

Comments
 (0)