Skip to content

fix(docker): Update air gap installation configuration #1650

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ docker-images:
@echo "-> Save the service images to a tar archive in the build/ directory"
@rm -rf build/
@mkdir -p build/
@docker save postgres redis scancodeio-worker scancodeio-web nginx | gzip > build/scancodeio-images.tar.gz
@docker save postgres redis scancodeio-worker scancodeio-web nginx clamav/clamav | gzip > build/scancodeio-images.tar.gz

offline-package: docker-images
@echo "-> Build package for offline installation in dist/"
Expand Down
20 changes: 16 additions & 4 deletions docker-compose-offline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ services:
- redis_data:/data

web:
image: scancodeio_web
image: scancodeio-web
command: sh -c "
./manage.py migrate &&
./manage.py collectstatic --no-input --verbosity 0 --clear &&
Expand All @@ -32,8 +32,12 @@ services:
- db

worker:
image: scancodeio_worker
command: wait-for-it web:8000 -- ./manage.py rqworker --worker-class scancodeio.worker.ScanCodeIOWorker --queue-class scancodeio.worker.ScanCodeIOQueue --verbosity 2
image: scancodeio-worker
# Ensure that potential db migrations run first by waiting until "web" is up
command: wait-for-it --strict --timeout=120 web:8000 -- sh -c "
./manage.py rqworker --worker-class scancodeio.worker.ScanCodeIOWorker
--queue-class scancodeio.worker.ScanCodeIOQueue
--verbosity 1"
env_file:
- docker.env
volumes:
Expand All @@ -42,7 +46,7 @@ services:
depends_on:
- redis
- db
- web # Ensure that potential db migrations run first
- web

nginx:
image: nginx
Expand All @@ -55,8 +59,16 @@ services:
depends_on:
- web

clamav:
image: clamav/clamav
volumes:
- clamav_data:/var/lib/clamav
- workspace:/var/scancodeio/workspace/
restart: always

volumes:
db_data:
redis_data:
clamav_data:
static:
workspace:
4 changes: 4 additions & 0 deletions docs/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,10 @@ and scripts on your local machine::
A tarball ``scancodeio-offline-package-VERSION.tar`` will be
created in the :guilabel:`dist/` directory.

.. note::
The offline package includes all necessary Docker images: postgres, redis,
scancodeio-web, scancodeio-worker, nginx, and clamav/clamav.

Install on an offline server
^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Expand Down
Loading