Skip to content

Commit 414274f

Browse files
authored
Refine the run-docker-dev to watch changes and restart worker service (#1483)
Signed-off-by: tdruez <tdruez@nexb.com>
1 parent 26ded5e commit 414274f

File tree

3 files changed

+14
-5
lines changed

3 files changed

+14
-5
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ run:
123123

124124
run-docker-dev:
125125
@echo "-> Run the Docker compose services in dev mode (hot reload on code changes)"
126-
docker compose -f docker-compose.yml -f docker-compose.dev.yml up
126+
docker compose -f docker-compose.yml -f docker-compose.dev.yml up --build --watch
127127

128128
test:
129129
@echo "-> Run the test suite"

docker-compose.dev.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
# Mount the local scanpipe/ directory in the containers
1+
# Dev mode, https://docs.docker.com/compose/how-tos/file-watch/
22

3+
# Mount the local scanpipe/ directory in the containers
34
# This can be used to refresh fixtures from the docker container:
45
# $ docker compose -f docker-compose.yml -f docker-compose.dev.yml up
56
# $ docker compose -f docker-compose.yml -f docker-compose.dev.yml run --rm web bash
@@ -15,5 +16,8 @@ services:
1516
worker:
1617
env_file:
1718
- docker.dev.env
18-
volumes:
19-
- ./scanpipe:/opt/scancodeio/scanpipe
19+
develop:
20+
watch:
21+
- action: sync+restart
22+
path: ./scanpipe
23+
target: /opt/scancodeio/scanpipe

docs/installation.rst

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,12 @@ Supported Platforms
229229
#. **macOS** 10.14 and up
230230

231231
.. warning::
232-
On **Windows** ScanCode.io can **only** be :ref:`run_with_docker`.
232+
On **Windows** ScanCode.io can **only** be :ref:`run_with_docker`.
233+
Alternatively, you can run a local checkout with the Docker compose stack using the
234+
dedicated command::
235+
236+
make run-docker-dev
237+
233238

234239
Pre-installation Checklist
235240
^^^^^^^^^^^^^^^^^^^^^^^^^^

0 commit comments

Comments
 (0)