Skip to content

Commit 40d5ad6

Browse files
Fix air gap installation: update image names, unify worker command, and add clamav service
1 parent 8ccbef3 commit 40d5ad6

File tree

3 files changed

+21
-5
lines changed

3 files changed

+21
-5
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ docker-images:
159159
@echo "-> Save the service images to a tar archive in the build/ directory"
160160
@rm -rf build/
161161
@mkdir -p build/
162-
@docker save postgres redis scancodeio-worker scancodeio-web nginx | gzip > build/scancodeio-images.tar.gz
162+
@docker save postgres redis scancodeio-worker scancodeio-web nginx clamav/clamav | gzip > build/scancodeio-images.tar.gz
163163

164164
offline-package: docker-images
165165
@echo "-> Build package for offline installation in dist/"

docker-compose-offline.yml

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ services:
1515
- redis_data:/data
1616

1717
web:
18-
image: scancodeio_web
18+
image: scancodeio-web
1919
command: sh -c "
2020
./manage.py migrate &&
2121
./manage.py collectstatic --no-input --verbosity 0 --clear &&
@@ -32,8 +32,12 @@ services:
3232
- db
3333

3434
worker:
35-
image: scancodeio_worker
36-
command: wait-for-it web:8000 -- ./manage.py rqworker --worker-class scancodeio.worker.ScanCodeIOWorker --queue-class scancodeio.worker.ScanCodeIOQueue --verbosity 2
35+
image: scancodeio-worker
36+
# Ensure that potential db migrations run first by waiting until "web" is up
37+
command: wait-for-it --strict --timeout=120 web:8000 -- sh -c "
38+
./manage.py rqworker --worker-class scancodeio.worker.ScanCodeIOWorker
39+
--queue-class scancodeio.worker.ScanCodeIOQueue
40+
--verbosity 1"
3741
env_file:
3842
- docker.env
3943
volumes:
@@ -42,7 +46,7 @@ services:
4246
depends_on:
4347
- redis
4448
- db
45-
- web # Ensure that potential db migrations run first
49+
- web
4650

4751
nginx:
4852
image: nginx
@@ -55,8 +59,16 @@ services:
5559
depends_on:
5660
- web
5761

62+
clamav:
63+
image: clamav/clamav
64+
volumes:
65+
- clamav_data:/var/lib/clamav
66+
- workspace:/var/scancodeio/workspace/
67+
restart: always
68+
5869
volumes:
5970
db_data:
6071
redis_data:
72+
clamav_data:
6173
static:
6274
workspace:

docs/installation.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,10 @@ and scripts on your local machine::
182182
A tarball ``scancodeio-offline-package-VERSION.tar`` will be
183183
created in the :guilabel:`dist/` directory.
184184

185+
.. note::
186+
The offline package includes all necessary Docker images: postgres, redis,
187+
scancodeio-web, scancodeio-worker, nginx, and clamav/clamav.
188+
185189
Install on an offline server
186190
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
187191

0 commit comments

Comments
 (0)