diff --git a/docker-compose.windows.yml b/docker-compose.windows.yml new file mode 100644 index 000000000..d241af4da --- /dev/null +++ b/docker-compose.windows.yml @@ -0,0 +1,16 @@ +services: + vulnerablecode: + volumes: + - ./vulnerablecode-config:/etc/vulnerablecode/ + + vulnerablecode_scheduler: + volumes: + - ./vulnerablecode-config:/etc/vulnerablecode/ + + vulnerablecode_rqworker: + volumes: + - ./vulnerablecode-config:/etc/vulnerablecode/ + + vulnerablecode_rqworker_high: + volumes: + - ./vulnerablecode-config:/etc/vulnerablecode/ diff --git a/docs/source/installation.rst b/docs/source/installation.rst index 9e9f3c7d1..e0a976e72 100644 --- a/docs/source/installation.rst +++ b/docs/source/installation.rst @@ -91,6 +91,47 @@ to run on a different port than 8000. Set ``STAGING=False`` in ``.env`` file to disable the staging environment warning. +Windows installation with Docker +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Windows users should run VulnerableCode with Docker Desktop. Native Windows +installation is not supported. + +Install and start Docker Desktop, then open PowerShell and clone the repository:: + + git clone https://github.com/aboutcode-org/vulnerablecode.git + cd vulnerablecode + +Create the configuration directory and its environment file using PowerShell. +The repository's existing ``docker.env`` file supplies the database and Redis +container settings; keep it in the repository root. Replace the example values +below with your own strong, unique secrets. Do not use the example values as-is:: + + New-Item -ItemType Directory -Force .\vulnerablecode-config + @" + SECRET_KEY=replace-with-a-strong-random-secret + ALTCHA_HMAC_KEY=replace-with-a-32-byte-hex-value + "@ | Set-Content .\vulnerablecode-config\.env + +The repository includes ``docker-compose.windows.yml`` to mount this configuration +directory into the application, scheduler, and RQ worker containers. Start and +check the services with:: + + docker compose -f docker-compose.yml -f docker-compose.windows.yml config --quiet + docker compose -f docker-compose.yml -f docker-compose.windows.yml up -d --build + docker compose -f docker-compose.yml -f docker-compose.windows.yml ps + +Check that all services are running and review their logs if startup fails:: + + docker compose -f docker-compose.yml -f docker-compose.windows.yml logs --tail=100 + +VulnerableCode should then be available at:: + + http://localhost + +To stop the services:: + + docker compose -f docker-compose.yml -f docker-compose.windows.yml down .. _local_development_installation: @@ -106,7 +147,8 @@ Supported Platforms #. **macOS** 12.1 and up .. warning:: - On **Windows** VulnerableCode can **only** :ref:`run_with_docker` and is not supported. + Native Windows installation is not supported. Windows users can run + VulnerableCode with Docker Desktop; see :ref:`run_with_docker`. Pre-installation Checklist ^^^^^^^^^^^^^^^^^^^^^^^^^^