Skip to content

Commit

Permalink
Refine the run-docker-dev to watch changes and restart worker service (
Browse files Browse the repository at this point in the history
…#1483)

Signed-off-by: tdruez <[email protected]>
  • Loading branch information
tdruez authored Dec 18, 2024
1 parent 26ded5e commit 414274f
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ run:

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

test:
@echo "-> Run the test suite"
Expand Down
10 changes: 7 additions & 3 deletions docker-compose.dev.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Mount the local scanpipe/ directory in the containers
# Dev mode, https://docs.docker.com/compose/how-tos/file-watch/

# Mount the local scanpipe/ directory in the containers
# This can be used to refresh fixtures from the docker container:
# $ docker compose -f docker-compose.yml -f docker-compose.dev.yml up
# $ docker compose -f docker-compose.yml -f docker-compose.dev.yml run --rm web bash
Expand All @@ -15,5 +16,8 @@ services:
worker:
env_file:
- docker.dev.env
volumes:
- ./scanpipe:/opt/scancodeio/scanpipe
develop:
watch:
- action: sync+restart
path: ./scanpipe
target: /opt/scancodeio/scanpipe
7 changes: 6 additions & 1 deletion docs/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,12 @@ Supported Platforms
#. **macOS** 10.14 and up

.. warning::
On **Windows** ScanCode.io can **only** be :ref:`run_with_docker`.
On **Windows** ScanCode.io can **only** be :ref:`run_with_docker`.
Alternatively, you can run a local checkout with the Docker compose stack using the
dedicated command::

make run-docker-dev


Pre-installation Checklist
^^^^^^^^^^^^^^^^^^^^^^^^^^
Expand Down

0 comments on commit 414274f

Please sign in to comment.