-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathprimary.yml
93 lines (92 loc) · 2.41 KB
/
primary.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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
version: '3.7'
services:
redis:
image: redis
ports:
- "6379:6379"
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 1s
timeout: 3s
retries: 30
restart: always
zookeeper:
image: wurstmeister/zookeeper
ports:
- "2181:2181"
env_file:
- ./docker/config/primary.env
healthcheck:
test: ["CMD", "nc", "-vz", "zookeeper", "2181"]
interval: 1s
timeout: 3s
retries: 30
restart: always
kafka:
image: wurstmeister/kafka:2.12-2.5.0
ports:
- "9092:9092"
env_file:
- ./docker/config/primary.env
volumes:
- /var/run/docker.sock:/var/run/docker.sock
depends_on:
zookeeper:
condition: service_healthy
healthcheck:
test: ["CMD", "nc", "-vz", "kafka", "9092"]
interval: 1s
timeout: 3s
retries: 30
restart: always
web:
build:
context: .
dockerfile: ./docker/django-gunicorn/Dockerfile
command: ./django_run.sh
volumes:
- static_volume:/home/django/C01/staticfiles
- /datalake/ufmg/webcrawlerc01/distributed_system_test/data:/data
expose:
- 9000
env_file:
- ./docker/config/primary.env
depends_on:
kafka:
condition: service_healthy
db:
condition: service_healthy
restart: on-failure
nginx:
build:
context: .
dockerfile: ./docker/nginx/Dockerfile
volumes:
- static_volume:/home/nginx/staticfiles
ports:
- 9000:8080
depends_on:
- web
db:
image: postgres:12.0-alpine
hostname: localhost
volumes:
- postgres_data:/var/lib/postgresql/data/
env_file:
- ./docker/config/primary.env
ports:
- "5432:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U $$POSTGRES_USER -d $$POSTGRES_DB"]
interval: 10s
timeout: 5s
retries: 5
volumes:
static_volume:
data:
driver: local
driver_opts:
type: 'none'
o: 'bind'
device: './data'
postgres_data: