-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
61 lines (58 loc) · 1.69 KB
/
docker-compose.yml
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
56
57
58
59
60
61
services:
env_django:
image: vulmatch
extra_hosts:
- "host.docker.internal:host-gateway"
build: .
volumes:
- .:/usr/src/app/
- ./www:/var/www/
environment:
- DJANGO_SETTINGS_MODULE=vulmatch.settings
- CELERY_BROKER_URL=redis://redis:6379/0
- result_backend=redis://redis:6379/1
- POSTGRES_HOST=pgdb
- DEBUG=1
env_file:
- ./.env
django:
extends: env_django
command: >
bash -c "
python manage.py collectstatic --no-input &&
python manage.py makemigrations &&
python manage.py migrate &&
python -m vulmatch.worker.populate_dbs &&
gunicorn vulmatch.wsgi:application --reload --bind 0.0.0.0:8005
"
ports:
- 8005:8005
depends_on:
- celery
celery:
extends: env_django
command: >
bash -c "
celery -A vulmatch.worker worker -l INFO
"
depends_on:
pgdb:
condition: service_healthy
redis:
condition: service_started
pgdb:
image: postgres
env_file:
- ./.env
volumes:
- pgdata:/var/lib/postgresql/data/
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}"]
interval: 10s
retries: 5
start_period: 10s
timeout: 10s
redis:
image: "redis:alpine"
volumes:
pgdata: