-
Notifications
You must be signed in to change notification settings - Fork 18
/
docker-compose.yml
77 lines (72 loc) · 1.83 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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
services:
db:
image: postgres:9.6
container_name: lookit-api-db
command: postgres -c stats_temp_directory=/tmp
volumes:
- ./data:/var/lib/postgresql/data
ports:
- "5432:5432"
environment:
- POSTGRES_DB=lookit
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 15s
timeout: 15s
retries: 5
web:
build:
dockerfile: Dockerfile.web
container_name: lookit-api-web
restart: on-failure
command: poetry run python ./manage.py runsslserver --certificate ./certs/local_lookit.mit.edu.pem --key ./certs/local_lookit.mit.edu-key.pem 0.0.0.0:8000
volumes:
- .:/code
ports:
- "8000:8000"
env_file:
- .env
environment:
- DB_HOST=db
- RABBITMQ_HOST=broker
depends_on:
db:
condition: service_healthy
broker:
image: rabbitmq:3.8.16-management-alpine
container_name: lookit-api-broker
env_file:
- .env
healthcheck:
test: rabbitmq-diagnostics -q ping
interval: 15s
timeout: 15s
retries: 5
worker:
build:
dockerfile: Dockerfile.web
container_name: lookit-api-worker
command: poetry run celery worker --app=project --loglevel=INFO -Q builds,email,cleanup
volumes:
- .:/code
- ./certs/dind/client:/certs/client
env_file:
- .env
environment:
- DB_HOST=db
- RABBITMQ_HOST=broker
- DOCKER_HOST=tcp://docker:2376
- DOCKER_TLS_VERIFY="1"
- DOCKER_CERT_PATH=/certs/client
depends_on:
broker:
condition: service_healthy
docker:
image: docker:dind
privileged: true
container_name: lookit-api-docker
volumes:
- ./certs/dind/client:/certs/client
- ./ember_build:/code/ember_build