-
Notifications
You must be signed in to change notification settings - Fork 4
/
docker-compose.yml
62 lines (62 loc) · 2.13 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
version: "3"
services:
laundry_api:
container_name: laundry_api
build:
context: .
dockerfile: Dockerfile_api_uwsgi
environment:
- ELASTICSEARCH_URL=http://elasticsearch:9200
ports:
- 5000:5000
links:
- elasticsearch
- redis
depends_on:
- elasticsearch
- redis
logging:
driver: "json-file"
# command: ["./wait-for-it.sh", "elasticsearch:9200", "--", "uwsgi", "--http", "0.0.0.0:5000", "-b", "32768", "--wsgi-file", "merge_machine/api.py", "--callable", "app", "--processes", "4", "--threads","2"]
# command: ["./wait-for-es.sh", "uwsgi", "--http", "0.0.0.0:5000", "-b", "32768", "--wsgi-file", "merge_machine/api.py", "--callable", "app", "--processes", "4", "--threads","2"]
command: /bin/bash -c "while ! netcat -z elasticsearch 9200; do echo Sleeping; sleep 1; done; echo Connected; uwsgi --http 0.0.0.0:5000 -b 32768 --wsgi-file merge_machine/api.py --callable app --master --processes 4 --threads 2"
laundry_worker:
container_name: laundry_worker
build:
context: .
dockerfile: Dockerfile_rqworker
environment:
- ELASTICSEARCH_URL=http://elasticsearch:9200
links:
- elasticsearch
- redis
depends_on:
- elasticsearch
- redis
logging:
driver: "json-file"
# command: ["./wait-for-it.sh", "elasticsearch:9200", "--", "python3", "merge_machine/worker.py"]
# command: ["./wait-for-es.sh", "python3", "merge_machine/worker.py"]
command: /bin/bash -c "while ! netcat -z elasticsearch 9200; do echo Sleeping; sleep 1; done; echo Connected; python3 merge_machine/worker.py"
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:5.6.2
container_name: elasticsearch
environment:
- bootstrap.memory_lock=true
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
- discovery.type=single-node
ulimits:
memlock:
soft: -1
hard: -1
ports:
- 9200:9200
redis:
image: redis
container_name: redis
ports:
- 6379:6379
deploy:
placement:
constraints: [node.role == manager]
command: redis-server --appendonly yes