-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
executable file
·91 lines (85 loc) · 2.13 KB
/
docker-compose.yml
File metadata and controls
executable file
·91 lines (85 loc) · 2.13 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
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
version: '3.3'
services:
django:
build: .
tty: true
env_file:
- .env
volumes:
- ./face_recognizer_server:/app
ports:
- "$WEB_PORT:$WEB_PORT"
environment:
- DJANGO_SETTINGS_MODULE=face_recognizer_server.settings_local
depends_on:
- postgres
command: /bin/bash -c "python manage.py migrate && python manage.py generate_person_statistic && python manage.py runserver 0.0.0.0:8000"
postgres:
image: postgres:10.4
env_file:
- .env
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
volumes:
- .:/app
ports:
- "$DB_PORT:$DB_PORT"
celery:
restart: always
build: .
env_file:
- .env
container_name: recognizer_celery
command: /bin/bash -c "make celery"
depends_on:
- postgres
- rabbitmq
volumes:
- ./face_recognizer_server:/app
celery_beat:
build: .
environment:
- DJANGO_SETTINGS_MODULE=face_recognizer_server.settings_local
volumes:
- ./face_recognizer_server:/app
restart: unless-stopped
depends_on:
- rabbitmq
links:
- rabbitmq
- postgres
- django
command: /bin/bash -c "cd /app && make celery_beat"
# RabbitMQ - queue
rabbitmq:
hostname: rabbitmq
image: rabbitmq:3-management
container_name: recognizer_rabbitmq
environment:
- RABBITMQ_DEFAULT_USER=recognizer
- RABBITMQ_DEFAULT_PASS=recognizer
ports:
- "5672:5672"
- "15672:15672" # here, we can access rabbitmq management plug
flower:
build: .
volumes:
- ./face_recognizer_server:/app
environment:
- DJANGO_SETTINGS_MODULE=face_recognizer_server.settings_local
- PY_AUTORELOAD=1
- PYTHONUNBUFFERED=1
ports:
- "5555:5555"
command: /bin/bash -c "flower -A face_recognizer_server.celery_config --port=5555 --basic_auth=$CELERY_HTTP_AUTH_LOGIN:$CELERY_HTTP_AUTH_PASSWORD"
nginx:
image: "nginx:1.13.5"
restart: always
container_name: nginx
ports:
- "80:80"
volumes:
- ./face_recognizer_server/conf.d:/etc/nginx/conf.d
depends_on:
- django