-
-
Notifications
You must be signed in to change notification settings - Fork 191
Expand file tree
/
Copy pathdocker-compose.dev.yml
More file actions
55 lines (48 loc) · 1.51 KB
/
docker-compose.dev.yml
File metadata and controls
55 lines (48 loc) · 1.51 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# Dev mode: overlay for local development with hot reload.
# Usage: $ make run
# See the Makefile for all available commands (test, migrate, bash, etc.)
name: scancodeio
x-dev-env: &dev-env
DJANGO_RUNSERVER_HIDE_WARNING: "true"
x-dev-build: &dev-build
context: .
target: base
services:
web:
build: *dev-build
env_file:
- .env
environment:
<<: *dev-env
# 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
worker:
build: *dev-build
env_file:
- .env
environment:
<<: *dev-env
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.
nginx:
profiles:
- production
# Disable clamav in dev mode, not needed for local development.
clamav:
profiles:
- production