Skip to content

Commit cb6f96c

Browse files
fix(docker): Update air gap installation configuration (#1650)
* Fix air gap installation: update image names, unify worker command, and add clamav service Signed-off-by: Fenil Jikadara <[email protected]>
1 parent 6d8cae8 commit cb6f96c

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
@@ -151,7 +151,7 @@ docker-images:
151151
@echo "-> Save the service images to a tar archive in the build/ directory"
152152
@rm -rf build/
153153
@mkdir -p build/
154-
@docker save postgres redis scancodeio-worker scancodeio-web nginx | gzip > build/scancodeio-images.tar.gz
154+
@docker save postgres redis scancodeio-worker scancodeio-web nginx clamav/clamav | gzip > build/scancodeio-images.tar.gz
155155

156156
offline-package: docker-images
157157
@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
@@ -16,7 +16,7 @@ services:
1616
- redis_data:/data
1717

1818
web:
19-
image: scancodeio_web
19+
image: scancodeio-web
2020
command: sh -c "
2121
./manage.py migrate &&
2222
./manage.py collectstatic --no-input --verbosity 0 --clear &&
@@ -33,8 +33,12 @@ services:
3333
- db
3434

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

4852
nginx:
4953
image: docker.io/library/nginx:latest
@@ -56,8 +60,16 @@ services:
5660
depends_on:
5761
- web
5862

63+
clamav:
64+
image: clamav/clamav
65+
volumes:
66+
- clamav_data:/var/lib/clamav
67+
- workspace:/var/scancodeio/workspace/
68+
restart: always
69+
5970
volumes:
6071
db_data:
6172
redis_data:
73+
clamav_data:
6274
static:
6375
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)