-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
50 lines (49 loc) · 1.56 KB
/
Copy pathdocker-compose.yml
File metadata and controls
50 lines (49 loc) · 1.56 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
services:
env_django:
image: cyberthreatexchange
extra_hosts:
- "host.docker.internal:host-gateway"
build: .
volumes:
- .:/usr/src/app/
- ./www:/var/www/
environment:
- DJANGO_SETTINGS_MODULE=cyberthreatexchange.settings
- CELERY_BROKER_URL=redis://redis:6379/0
- result_backend=redis://redis:6379/1
env_file:
- ./.env
command: >
bash -c "
python manage.py collectstatic --no-input &&
python manage.py makemigrations &&
python manage.py migrate
"
django:
extends: env_django
command: >
bash -c "
python -m cyberthreatexchange.worker.populate_dbs &&
gunicorn cyberthreatexchange.wsgi:application --config gunicorn.conf.py --reload --bind 0.0.0.0:8007
"
ports:
- 8007:8007
depends_on:
- celery
healthcheck:
test: ["CMD-SHELL", "curl http://localhost:8007/api/schema/"]
interval: 10s
retries: 5
start_period: 10s
timeout: 10s
celery:
extends: env_django
command: >
bash -c "
celery -A cyberthreatexchange.worker worker -l INFO
"
depends_on:
redis:
condition: service_started
redis:
image: "redis:alpine"