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