Skip to content
Merged
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
15 changes: 11 additions & 4 deletions docker-compose.dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,15 @@ services:
- .env
environment:
<<: *dev-env
command: ./manage.py runserver --skip-checks 0.0.0.0:8001
# Skip migrate when the DB schema is already up to date (faster reload)
command: sh -c "
./manage.py migrate --check || ./manage.py migrate;
./manage.py runserver --skip-checks 0.0.0.0:8001"
volumes:
- ./scancodeio:/opt/scancodeio/scancodeio
- ./scanpipe:/opt/scancodeio/scanpipe
ports:
# Port 8001 to avoid conflict when running side-by-side with dejacode on 8000
- "8001:8001"

# Volume mount keeps code in sync. Restart manually with: make restart-worker
Expand All @@ -31,10 +36,12 @@ services:
- .env
environment:
<<: *dev-env
command: ./manage.py rqworker --worker-class scancodeio.worker.ScanCodeIOWorker
--queue-class scancodeio.worker.ScanCodeIOQueue
--verbosity 1
command: wait-for-it --strict --timeout=180 web:8001 -- sh -c "
./manage.py rqworker --worker-class scancodeio.worker.ScanCodeIOWorker
--queue-class scancodeio.worker.ScanCodeIOQueue
--verbosity 1"
volumes:
- ./scancodeio:/opt/scancodeio/scancodeio
- ./scanpipe:/opt/scancodeio/scanpipe

# Disable nginx in dev mode, the runserver serves requests directly.
Expand Down
5 changes: 3 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ services:
./manage.py migrate &&
./manage.py collectstatic --no-input --verbosity 0 --clear &&
gunicorn scancodeio.wsgi:application --bind :8000 --timeout 600 \
--workers 8 ${GUNICORN_RELOAD_FLAG:-}"
--workers 8 --worker-tmp-dir /dev/shm ${GUNICORN_RELOAD_FLAG:-}"
env_file:
- docker.env
expose:
Expand Down Expand Up @@ -118,8 +118,8 @@ services:
- "${NGINX_PUBLISHED_HTTPS_PORT:-443}:443"
volumes:
- ./etc/nginx/conf.d/:/etc/nginx/conf.d/
- /var/www/html:/var/www/html
- static:/var/scancodeio/static/
- webroot:/var/www/html/
depends_on:
- web
restart: always
Expand All @@ -137,3 +137,4 @@ volumes:
clamav_data:
static:
workspace:
webroot:
Loading